mirror of
https://github.com/jrconlin/oauthsimple.git
synced 2026-09-15 02:53:57 +00:00
Using empty() on a string 0 returns true. Using strlen instead.
php -r '$string="0"; var_dump(empty($string));'
bool(true)
This commit is contained in:
+1
-1
@@ -326,7 +326,7 @@ class OAuthSimple {
|
||||
function _oauthEscape($string) {
|
||||
if ($string === 0)
|
||||
return 0;
|
||||
if (empty($string))
|
||||
if (strlen($string) == 0)
|
||||
return '';
|
||||
if (is_array($string))
|
||||
throw new OAuthSimpleException('Array passed to _oauthEscape');
|
||||
|
||||
Reference in New Issue
Block a user