#37711 [Opn->Bgs]: no access to error when extended class

From: Date: Tue, 06 Jun 2006 10:30:25 +0000
Subject: #37711 [Opn->Bgs]: no access to error when extended class
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-98083@lists.php.net to get a copy of this message
ID: 37711 Updated by: tony2001@php.net Reported By: lampacz at gmail dot com -Status: Open +Status: Bogus Bug Type: MySQLi related Operating System: Debian PHP Version: 5.1.4 New Comment: Apparently there are no such class constants. If you want to access inherited properties - use $this->errno, this is what inheritance is about. Previous Comments: ------------------------------------------------------------------------ [2006-06-06 10:26:16] lampacz at gmail dot com Description: ------------ when extending class there is no access to parent::error, parent::errno access to functions (query, set_charset, ...)works Reproduce code: --------------- class dbMYSQL extends mysqli { ... function __construct( parent::__construct($args....); echo parent::errno; echo parent::error; } ... } Expected result: ---------------- 0 '' or some error and error message when error occurs Actual result: -------------- Fatal error: Undefined class constant 'errno' Fatal error: Undefined class constant 'error' ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37711&edit=1

« previous php.bugs (#98083) next »