Re: parent::construct not reliable working on php5.1 b2/b3

From: Date: Wed, 03 Aug 2005 07:45:19 +0000
Subject: Re: parent::construct not reliable working on php5.1 b2/b3
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-219883@lists.php.net to get a copy of this message
Thanks, the problem with cut an paste i have not only one of these messages i get huge amounts of these. So i stripped down to one, sorry my fault. a) usally 4-6 b) no c) yes, as I mentioned i tried both (old/new) d) never tested i jump over 5.0 the problem with the code is currently the problem only occures in the real application which as about 20000 lines of code. I tried to stripped down but there was not success. So I ask about how could i work out an idea from the php source to find these problem. I'am pretty sure that i done everything rightly in my application code. It works perfectly with the old-style and php 4.x and i converted all to the new style which is easy of course it is generated php source code so there is not really a general fault possible. If the generator works-:) your questions aren't silly meno Am 02.08.2005 um 23:34 schrieb Jochem Maas:
Meno Abels wrote:
it is only a typo in my email i use __construct
ok - I would recommend cut-n-paste for this kind of output to prevent idiots like me pointing out you typos and to avoid confusion in general. the next questions would be: a, how many parents does the problem class (Link or Links?) have? b, is Rank the base class? c, does Rank::__construct() actually exist? d, does the error also occur with php5.0.x? (as apposed to php5.1beta) given these questions may seem silly - but I can't see your code from here :-) so I figured I'd ask anyway!
Meno 2005/8/2, Jochem Maas <jochem@iamjochem.com>:
Pawel Bernat wrote:
On Tue, Aug 02, 2005 at 03:42:00PM +0100, Meno Abels wrote:
Hello, With my application that uses heavily inherent classes, sometimes I
deeeeep class heirarchies can lead to brainfreeze - beware of going to deep :-)
get the following message: PHP Fatal error: Call to undefined method Rank::_construtor() in
.../inc/Links.class.php.                           It works with php
4.x when I use the old style of constructor calling $this->(CLASSNAME) . But when working with php 5.2 b2 or b3 in the old OR the new style, I get the PHP Fatal error from above. Is there any hints to look at this problem?
Why do you call _construct instead of __construct? And how do you do it?
he seems to be calling _construtor() which although not wrong is not the method he is looking for (cue voice of Alex Guiness for the second time this week :-) try __construct() PS - this kind of thing belongs on generals until you are _sure_ it's an internals problem. IMHO.
Did you read everything at http://php.net/construct (including Note)? What about php 5.0?
-- Meno Abels 20six AG Office: Home: 2 Lampton Place 21 Clarendon Road,Flat 4 W11 2SH London RH1 1QJ Redhill UK UK P: +44 20 7243 4781 P: +44 17 3776 3809 F: +44 20 7243 4762 M: +44 78 7159 9638

« previous php.general (#219883) next »