ID: 45851 Updated by: [EMAIL PROTECTED] Reported By: peterbelm at gmail dot com Status: Assigned Bug Type: MySQLi related Operating System: * PHP Version: 5.2.6 Assigned To: mysql New Comment:
Assigned to mysql Previous Comments: ------------------------------------------------------------------------ [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