php.net |  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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: lampacz at gmail dot com
New email:
PHP Version: OS:

 

 [2006-06-06 10:26 UTC] 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'

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-06-06 10:30 UTC] tony2001@php.net
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: Thu Dec 26 13:01:30 2024 UTC