]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix php4 legacy calls
authorThomas Zander <zander@kde.org>
Wed, 8 Jun 2011 21:12:06 +0000 (23:12 +0200)
committerThomas Zander <zander@kde.org>
Mon, 13 Jun 2011 11:48:25 +0000 (13:48 +0200)
Reviewed-by: Robin Appelman
Reviewboard: http://git.reviewboard.kde.org/r/101549/

3dparty/MDB2.php
3dparty/MDB2/Schema/Parser.php
3dparty/MDB2/Schema/Validate.php
3dparty/PEAR.php

index 30e564f14577965b150254516b9377f7db3343e3..fbc7107914ebc7942817fa44b46149f6cf908588 100644 (file)
@@ -639,7 +639,7 @@ class MDB2
      */
     static function isError($data, $code = null)
     {
-        if (is_a($data, 'MDB2_Error')) {
+        if ($data instanceof MDB2_Error) {
             if (is_null($code)) {
                 return true;
             } elseif (is_string($code)) {
@@ -666,7 +666,7 @@ class MDB2
      */
     static function isConnection($value)
     {
-        return is_a($value, 'MDB2_Driver_Common');
+        return ($value instanceof MDB2_Driver_Common);
     }
 
     // }}}
@@ -683,7 +683,7 @@ class MDB2
      */
     static function isResult($value)
     {
-        return is_a($value, 'MDB2_Result');
+        return $value instanceof MDB2_Result;
     }
 
     // }}}
@@ -700,7 +700,7 @@ class MDB2
      */
     static function isResultCommon($value)
     {
-        return is_a($value, 'MDB2_Result_Common');
+        return ($value instanceof MDB2_Result_Common);
     }
 
     // }}}
@@ -717,7 +717,7 @@ class MDB2
      */
     static function isStatement($value)
     {
-        return is_a($value, 'MDB2_Statement_Common');
+        return $value instanceof MDB2_Statement_Common;
     }
 
     // }}}
index bd7a96579325800bbdec2181557ad6eb62d9178b..b740ef55fa85d17fc82dfb1fb08ecccdc493e02b 100644 (file)
@@ -127,13 +127,6 @@ class MDB2_Schema_Parser extends XML_Parser
         $this->val       =new MDB2_Schema_Validate($fail_on_invalid_names, $valid_types, $force_defaults);
     }
 
-    function MDB2_Schema_Parser($variables, $fail_on_invalid_names = true,
-                                $structure = false, $valid_types = array(),
-                                $force_defaults = true)
-    {
-        $this->__construct($variables, $fail_on_invalid_names, $structure, $valid_types, $force_defaults);
-    }
-
     function startHandler($xp, $element, $attribs)
     {
         if (strtolower($element) == 'variable') {
@@ -503,7 +496,7 @@ class MDB2_Schema_Parser extends XML_Parser
         $this->element = implode('-', $this->elements);
     }
 
-    function &raiseError($msg = null, $xmlecode = 0, $xp = null, $ecode = MDB2_SCHEMA_ERROR_PARSE,$a=null,$b=null,$c=null)
+    function raiseError($msg = null, $xmlecode = 0, $xp = null, $ecode = MDB2_SCHEMA_ERROR_PARSE,$a=null,$b=null,$c=null)
     {
         if (is_null($this->error)) {
             $error = '';
index 21be024ce9fbbc883ea200aecbad1f7c038abcf7..217cf51b9592545c892d16e2108912f7e8606750 100644 (file)
@@ -91,11 +91,6 @@ class MDB2_Schema_Validate
         $this->force_defaults = $force_defaults;
     }
 
-    function MDB2_Schema_Validate($fail_on_invalid_names = true, $valid_types = array(), $force_defaults = true)
-    {
-        $this->__construct($fail_on_invalid_names, $valid_types, $force_defaults);
-    }
-
     // }}}
     // {{{ raiseError()
 
index 9760b9d265a8437d9f196a26fb4e657a56e5ce99..f832c0d49162c40c64ecc9b43762a58561f2c15b 100644 (file)
@@ -249,7 +249,7 @@ class PEAR
      */
     static function isError($data, $code = null)
     {
-        if (is_a($data, 'PEAR_Error')) {
+        if ($data instanceof PEAR_Error) {
             if (is_null($code)) {
                 return true;
             } elseif (is_string($code)) {
@@ -305,7 +305,7 @@ class PEAR
 
     function setErrorHandling($mode = null, $options = null)
     {
-        if (isset($this) && is_a($this, 'PEAR')) {
+        if (isset($this) && $this instanceof PEAR) {
             $setmode     = &$this->_default_error_mode;
             $setoptions  = &$this->_default_error_options;
         } else {
@@ -557,7 +557,7 @@ class PEAR
                          $code = null,
                          $userinfo = null)
     {
-        if (isset($this) && is_a($this, 'PEAR')) {
+        if (isset($this) && $this instanceof PEAR) {
             return $this->raiseError($message, $code, null, null, $userinfo);
         } else {
             return PEAR::raiseError($message, $code, null, null, $userinfo);
@@ -653,7 +653,7 @@ class PEAR
     function pushErrorHandling($mode, $options = null)
     {
         $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_options = &$this->_default_error_options;
         } else {
@@ -662,7 +662,7 @@ class PEAR
         }
         $stack[] = array($def_mode, $def_options);
 
-        if (isset($this) && is_a($this, 'PEAR')) {
+        if (isset($this) && $this instanceof PEAR) {
             $this->setErrorHandling($mode, $options);
         } else {
             PEAR::setErrorHandling($mode, $options);
@@ -687,7 +687,7 @@ class PEAR
         array_pop($stack);
         list($mode, $options) = $stack[sizeof($stack) - 1];
         array_pop($stack);
-        if (isset($this) && is_a($this, 'PEAR')) {
+        if (isset($this) && $this instanceof PEAR) {
             $this->setErrorHandling($mode, $options);
         } else {
             PEAR::setErrorHandling($mode, $options);