Re: [Sqlrelay-discussion] Pear class error
Brought to you by:
mused
From: david f. <df...@vi...> - 2005-08-13 10:56:28
|
I got the following error : Warning: Illegal offset type in unset in /usr/share/pear/DB/sqlrelay.php on line 416 the code their is the following : // $sqlrcursor is a prepared query handle $sqlrcursor = (int)$sqlrcursor; 416-> if (!isset($this->prepare_tokens[$sqlrcursor])) { return false; } as you see this is the tested case when a query has been prepared. But concerning the class prepare, it seems that you overwrite the class like that : function prepare($query) { $cursor = sqlrcur_alloc($this->connection); sqlrcur_setResultSetBufferSize($cursor,100); sqlrcur_prepareQuery($cursor, $query); return new DB_sqlrelay_cursor($cursor,$this->connection); } looking at this code we see that you do not call the prepare method describe in common.php. And by it, you do not declare any more a value for ($this->prepare_tokens). I don't sure at 100% but I suppose the matter is there. If you could provide a new version correcting this. thanks in advance regards david |