Skip to content
Extraits de code Groupes Projets
Valider d7a45075 rédigé par robocoder's avatar robocoder
Parcourir les fichiers

is_a() is deprecated for php 5.0.x to 5.2.x

git-svn-id: http://dev.piwik.org/svn/trunk@2422 59fd770c-687e-43c8-a1e3-f5a4ff64c105
parent 649164bb
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -249,7 +249,7 @@ class PEAR ...@@ -249,7 +249,7 @@ class PEAR
*/ */
static function isError($data, $code = null) static function isError($data, $code = null)
{ {
if (!is_a($data, 'PEAR_Error')) { if (!($data instanceof PEAR_Error)) {
return false; return false;
} }
...@@ -302,7 +302,7 @@ class PEAR ...@@ -302,7 +302,7 @@ class PEAR
*/ */
function setErrorHandling($mode = null, $options = null) function setErrorHandling($mode = null, $options = null)
{ {
if (isset($this) && is_a($this, 'PEAR')) { if (isset($this) && ($this instanceof PEAR)) {
$setmode = &$this->_default_error_mode; $setmode = &$this->_default_error_mode;
$setoptions = &$this->_default_error_options; $setoptions = &$this->_default_error_options;
} else { } else {
...@@ -554,7 +554,7 @@ class PEAR ...@@ -554,7 +554,7 @@ class PEAR
*/ */
function &throwError($message = null, $code = null, $userinfo = null) function &throwError($message = null, $code = null, $userinfo = null)
{ {
if (isset($this) && is_a($this, 'PEAR')) { if (isset($this) && ($this instanceof PEAR)) {
$a = &$this->raiseError($message, $code, null, null, $userinfo); $a = &$this->raiseError($message, $code, null, null, $userinfo);
return $a; return $a;
} }
...@@ -649,7 +649,7 @@ class PEAR ...@@ -649,7 +649,7 @@ class PEAR
function pushErrorHandling($mode, $options = null) function pushErrorHandling($mode, $options = null)
{ {
$stack = &$GLOBALS['_PEAR_error_handler_stack']; $stack = &$GLOBALS['_PEAR_error_handler_stack'];
if (isset($this) && is_a($this, 'PEAR')) { if (isset($this) && ($this instanceof PEAR)) {
$def_mode = &$this->_default_error_mode; $def_mode = &$this->_default_error_mode;
$def_options = &$this->_default_error_options; $def_options = &$this->_default_error_options;
} else { } else {
...@@ -658,7 +658,7 @@ class PEAR ...@@ -658,7 +658,7 @@ class PEAR
} }
$stack[] = array($def_mode, $def_options); $stack[] = array($def_mode, $def_options);
if (isset($this) && is_a($this, 'PEAR')) { if (isset($this) && ($this instanceof PEAR)) {
$this->setErrorHandling($mode, $options); $this->setErrorHandling($mode, $options);
} else { } else {
PEAR::setErrorHandling($mode, $options); PEAR::setErrorHandling($mode, $options);
...@@ -680,7 +680,7 @@ class PEAR ...@@ -680,7 +680,7 @@ class PEAR
array_pop($stack); array_pop($stack);
list($mode, $options) = $stack[sizeof($stack) - 1]; list($mode, $options) = $stack[sizeof($stack) - 1];
array_pop($stack); array_pop($stack);
if (isset($this) && is_a($this, 'PEAR')) { if (isset($this) && ($this instanceof PEAR)) {
$this->setErrorHandling($mode, $options); $this->setErrorHandling($mode, $options);
} else { } else {
PEAR::setErrorHandling($mode, $options); PEAR::setErrorHandling($mode, $options);
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter