ID: 45851
Updated by: [EMAIL PROTECTED]
Reported By: peterbelm at gmail dot com
-Status: Assigned
+Status: Bogus
Bug Type: MySQLi related
Operating System: *
PHP Version: 5.2.6
Assigned To: mysql
New Comment:
The error message should be clear enough, changing the behavior there
creates costs which aren't justified by such a tiny cosmetic
improvement.
Previous Comments:
------------------------------------------------------------------------
[2008-08-19 00:23:49] [EMAIL PROTECTED]
Assigned to mysql
------------------------------------------------------------------------
[2008-08-18 14:18:00] peterbelm at gmail dot com
Description:
------------
If a column is select with an empty name like so:
SELECT id as ``...
You get a fatal error "Cannot access empty property". Looking through
the Zend code I found it happens when looking up property info.
Shouldn't mysqli check for empty property names when creating the
object, triggering it's own (more useful) error?
Reproduce code:
---------------
$link = mysqli_connect($host, $user, $pass);
mysqli_select_db($schema);
$result = mysqli_query("select 'test' as ``", $link);
$obj = mysqli_fetch_object($result);
Expected result:
----------------
A fatal error along the lines of "Empty column name in SQL"
Actual result:
--------------
Fatal error: "Cannot access empty property"
Generated from Zend/zend_object_handlers.c:188
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45851&edit=1