ID:               48189
 Updated by:       fel...@php.net
 Reported By:      maxwer at ukr dot net
-Status:           Open
+Status:           Assigned
 Bug Type:         InterBase related
 Operating System: Win2000SP4
 PHP Version:      5.2.9
-Assigned To:      
+Assigned To:      kalle
 New Comment:

The patch is fine, Kalle. (Not for 5.2.x though)
But we need to warn in the documentation about someone relying in the
'if (ibase_execute())' check. As the function is intended to return
FALSE on error, and the "0 " has been used until the moment to be an
"zero true".



Previous Comments:
------------------------------------------------------------------------

[2009-07-22 08:23:31] ka...@php.net

Could you please try with this patch against PHP_5_3 svn:
Index: ibase_query.c
===================================================================
--- ibase_query.c       (revision 284410)
+++ ibase_query.c       (working copy)
@@ -1031,8 +1031,7 @@
                                if (affected_rows) {
                                        RETVAL_LONG(affected_rows);
                                } else {
-                                       /* this return value evaluates to 
bool(true) and to int(0) */
-                                       RETVAL_STRINGL("0 ",2,1);
+                                       RETVAL_TRUE;
                                }
                                break;
                        }


------------------------------------------------------------------------

[2009-07-15 14:06:04] lf dot amorim at yahoo dot com dot br

I am also encountering the same problem.

------------------------------------------------------------------------

[2009-06-18 12:17:12] max_wer at ukr dot net

I beg pardon.
A function returns the STRING '0 ',
if it will return and INTEGER 0,
I will be happy

------------------------------------------------------------------------

[2009-06-18 12:15:04] max_wer at ukr dot net

A function returns the line of '0 '(with space),
 if it will return a number 0,
 I will be happy :-)

------------------------------------------------------------------------

[2009-06-08 12:32:26] lester at lsces dot co dot uk

I've got this configured on my test machine now, and con confirm that
the if there is an error then false is returned, but a functional query
which affects no rows returns '0' as would probably be expected in other
Firebird Applications?
The question is - should the documentation be changed or the function
extended?
ibase_query has the same problem!

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/48189

-- 
Edit this bug report at http://bugs.php.net/?id=48189&edit=1

Reply via email to