|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37711 no access to error when extended class
Submitted: 2006-06-06 10:26 UTC Modified: 2006-06-06 10:30 UTC
From: lampacz at gmail dot com Assigned:
Status: Not a bug Package: MySQLi related
PHP Version: 5.1.4 OS: Debian
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: lampacz at gmail dot com
New email:
PHP Version: OS:


 [2006-06-06 10:26 UTC] lampacz at gmail dot com
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(
echo parent::errno;
echo parent::error;

Expected result:

or some error and error message when error occurs

Actual result:
Fatal error: Undefined class constant 'errno'
Fatal error: Undefined class constant 'error'


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-06-06 10:30 UTC]
Apparently there are no such class constants.
If you want to access inherited properties - use $this->errno, this is what inheritance is about. 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jul 19 18:01:30 2024 UTC