diff --git a/PEAR.php b/PEAR.php index 89568a0e5..cf9a02de2 100644 --- a/PEAR.php +++ b/PEAR.php @@ -542,7 +542,7 @@ protected static function _raiseError($object, count($object->_expected_errors) > 0 && count($exp = end($object->_expected_errors)) ) { - if ($exp[0] == "*" || + if ($exp[0] === "*" || (is_int(reset($exp)) && in_array($code, $exp)) || (is_string(reset($exp)) && in_array($message, $exp)) ) { diff --git a/PEAR/PackageFile.php b/PEAR/PackageFile.php index bbbaff63d..b1252ae0b 100644 --- a/PEAR/PackageFile.php +++ b/PEAR/PackageFile.php @@ -315,7 +315,7 @@ function &fromTgzFile($file, $state) } if (!is_array($content)) { - if (is_string($file) && strlen($file < 255) && + if (is_string($file) && strlen($file) < 255 && (!file_exists($file) || !@is_file($file))) { $ret = PEAR::raiseError("could not open file \"$file\""); return $ret;