Bug #14039 [Com]: Invalid statement handle
| From: | spam2 at rhsoft dot net | Date: | Mon, 16 Oct 2017 16:33:56 +0000 |
| Subject: | Bug #14039 [Com]: Invalid statement handle | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-211726@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=14039&edit=1
ID: 14039
Comment by: spam2 at rhsoft dot net
Reported by: opolette at yahoo dot com
Summary: Invalid statement handle
Status: Closed
Type: Bug
Package: InterBase related
Operating System: Windows NT 4 SP 4
PHP Version: 4.0.6
Block user comment: N
Private report: N
New Comment:
this is broken code anyways, a sane IDE would tell you (assignment in condition)
while($fl = ibase_fetch_object($res))
the docs don't tell anything at http://php.net/manual/de/function.ibase-fetch-object.php
but when you look at http://php.net/manual/de/mysqli-result.fetch-object.php
it should look like
while(($fl = ibase_fetch_object($res)) !== NULL)
Previous Comments:
------------------------------------------------------------------------
[2017-10-16 16:26:43] ffortuny at gmail dot com
Apparently, it has not been reported that this problem is now again in version 7.0 (at least, I have
not checked 7.1).
For 3 years this statement:
while($fl = ibase_fetch_object($res)) {
// $res = sql with 17 columns and a maximum of 30 rows
}
had been working seamlessly in up to version 5.6. As the app is now in a server with php 7.0, this
is the only statement failing (so far).
------------------------------------------------------------------------
[2002-04-13 14:37:59] daniela@php.net
The version of PHP that this bug was reported in is too old.
Please try the php-4.2.0RC3 from http://www.php.net/~derick/
If you are still able to reproduce the bug, please change the PHP
version on this bug report to the version you tested and change
the status back to "Open".
This bug should be fixed now.
You were right, the problem was in ibase_close().
However have a look at:
http://www.php.net/manual/en/function.ibase-close.php
Daniela
------------------------------------------------------------------------
[2001-11-13 04:41:52] opolette at yahoo dot com
When exiting a function after having closed a link to Interbase, the warning "Invalid statement
handle" is displayed. apparently, PHP tries to close the connection by itself even if it has
already been closed, which raises this warning from interbase.
Example :
<?php
function foo() {
$link = ibase_connect("//ibase/mybase", "login",
"password");
.... // some code here
ibase_close ($link);
return -1; // generates the warning
}
$x = foo(); // warning displayed
>
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=14039&edit=1