PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
PHP 5 - Non-static method PEAR::isError()

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> PEAR
View previous topic :: View next topic  
Author Message
redbrad0



Joined: 12 Jul 2008
Posts: 2

PostPosted: Mon Dec 20, 2010 7:35 am    Post subject: PHP 5 - Non-static method PEAR::isError() Reply with quote

Since upgrading to PHP I am getting this error in all of my php pages. My customer error handling is grabbing and not displaying the error, but I would like to fix it instead of just hiding it. I have been looking all over and I cant seem to find anything. Can someone help give me an idea on how to fix this, if it can be fixed?


Quote:

[type] => 2048
[message] => Non-static method PEAR::isError() should not be called statically
[file] => /home/www/domain.com/public_html/_test.php
[line] => 14



Code:

<?php
try   {
   require_once 'inc_config.php';

   // Pull all the states that we have outlets in
   $query = "select
                 ID,
                 Name
             FROM
                TableName
               ORDER BY ID
                     desc LIMIT 1000";
  $res =& $db['myDatabase']->query($query);
  if (!PEAR::isError($res)) {
      while ($res->fetchInto($row))   {
         $dbID      = $row['ID'];
         $dbName   = $row['Name'];
      }
  } else
    throw new MyException($_SERVER['SCRIPT_NAME'] . ":", MyException::UNKNOWN_ERROR);
   
} catch (TixException $ex) {
   $ex->errorMessage();
}
?>
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> PEAR All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement