From: rbro at hotmail dot com
Operating system: Linux
PHP version: 5CVS-2004-12-02 (dev)
PHP Bug Type: MySQLi related
Bug description: Extending a class that extends mysqli
Description:
------------
I'm running into a problem when trying to extend a class that extends
mysqli. I cannot access any of the properties. This is related to bug
28430 except here I am extending the class one level further.
Reproduce code:
---------------
<?php
error_reporting(E_ALL);
class a extends mysqli { }
class b extends a { }
$mysqli = new mysqli('localhost', 'username', 'password', 'db');
echo $mysqli->warning_count."\n";
$a = new a('localhost', 'username', 'password', 'db');
echo $a->warning_count."\n";
$b = new b('localhost', 'username', 'password', 'db');
echo $b->warning_count."\n";
?>
Expected result:
----------------
0
0
0
Actual result:
--------------
0
0
Notice: Undefined property: b::$warning_count in /var/www/html/test.php
on line 15
--
Edit bug report at http://bugs.php.net/?id=30967&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30967&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=30967&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=30967&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=30967&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=30967&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=30967&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=30967&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=30967&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30967&r=support
Expected behavior: http://bugs.php.net/fix.php?id=30967&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=30967&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=30967&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=30967&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30967&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=30967&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=30967&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30967&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=30967&r=float
MySQL Configuration Error: http://bugs.php.net/fix.php?id=30967&r=mysqlcfg