English > General Questions
Notice: Use of undefined constant parent - assumed 'parent' in jddatabase:101
(1/1)
Finarfin:
--- Quote ---As for the "parent" issue:
Use of undefined constant parent - assumed 'parent'
You are seeing this because you have the following code:
if (method_exists(parent, '__construct')) parent::__construct();
Which should actually be:
if (method_exists(get_parent_class($this), '__construct')) parent::__construct();
--- End quote ---
From here http://stackoverflow.com/questions/4794483/zend-framework-phpunit-path-issues
Harald Leithner:
Thx for figure this out but if there is no __construct function I should not call it ;)
Finarfin:
Sorry, I didn´t explain properly the point :D
Arount 101 on jddatabase.php, you´ll get the error "Notice: Use of undefined constant parent - assumed 'parent' in jddatabase:101"
You have a function there that says (method_exists(parent, '__wakeup'), that generates the notice.
The example I gave you is the solution for a really similar problem, but not the same (he was calling a function called __construct, yours is __wakeup). Apart from that , is the same problem :P
Finarfin:
Changing the one on line 88 seems to generate differents error. It seems that it didn´t enter there before
Harald Leithner:
schould be solve.
Navigation
[0] Message Index
Go to full version