#25003 [Asn]: DB bums out with a "Call to member function on a non-object"

From: Date: Sun, 10 Aug 2003 18:32:41 +0000
Subject: #25003 [Asn]: DB bums out with a "Call to member function on a non-object"
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-19487@lists.php.net to get a copy of this message
ID: 25003 User updated by: gildseth at start dot no Reported By: gildseth at start dot no Status: Assigned Bug Type: PEAR related Operating System: Linux PHP Version: 4.3.1 Assigned To: cox New Comment: An example which triggers the bug: <?PHP define('DB_CONNECT_STR', 'mysql://username:password@hostname/database'); require_once('DB.php'); $pearDB = DB::connect(DB_CONNECT_STR); $pearDB->getAll('DELETE FROM test WHERE id=4'); /* CREATE TABLE test (id int(11) default NULL); INSERT INTO test VALUES(4); */ ?> Previous Comments: ------------------------------------------------------------------------ [2003-08-10 10:44:05] gildseth at start dot no Description: ------------ I accidentally passed a DELETE query to DB::getAll, and DB fell over: Fatal error: Call to a member function on a non-object in /usr/local/lib/php/DB/common.php on line 1166 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25003&edit=1

« previous php.pear.dev (#19487) next »