Re: [PHP] String passed to object constructor turning into an instance of that object?

2010-12-16 Thread David Harkness
I've never used the old-style constructors, but perhaps the semantics of "parent::" changed and you need to instead use "$this->" as in $this->Tag("option", $name); That's a total guess. I don't have 5.2 handy to try it out, but both work in 5.3 using a simple example. Can you post the constr

Re: [PHP] String passed to object constructor turning into an instance of that object?

2010-12-16 Thread Nathan Nobbe
On Thu, Dec 16, 2010 at 4:04 PM, Kris Deugau wrote: > Nathan Nobbe wrote: > >> probly something screwy going on w/ the old style of naming constructors. >> 2 >> things, >> >> 1. can you post the Tag constructor as it reads now? >> > > function Tag($tag='', $tagContent='') { > $this->tagContent

Re: [PHP] String passed to object constructor turning into an instance of that object?

2010-12-16 Thread Kris Deugau
Nathan Nobbe wrote: probly something screwy going on w/ the old style of naming constructors. 2 things, 1. can you post the Tag constructor as it reads now? function Tag($tag='', $tagContent='') { $this->tagContent = $tagContent; $this->tag = $tag; $this->showEndTag = false; $this->a

Re: [PHP] String passed to object constructor turning into an instance of that object?

2010-12-16 Thread Nathan Nobbe
On Thu, Dec 16, 2010 at 2:29 PM, Kris Deugau wrote: > Tommy Pham wrote: > >> class SelectBoxOption extends Tag { >>> function SelectBoxOption($name, $value, $selected=false) { >>> parent::Tag("option", $name); >>> $this->addAttribute("value", $value); >>> if($selected) { >

Re: [PHP] String passed to object constructor turning into an instance of that object?

2010-12-16 Thread Kris Deugau
Tommy Pham wrote: class SelectBoxOption extends Tag { function SelectBoxOption($name, $value, $selected=false) { parent::Tag("option", $name); $this->addAttribute("value", $value); if($selected) { $this->addAttribute("selected", '', false); } if ($name

RE: [PHP] String passed to object constructor turning into an instance of that object?

2010-12-16 Thread Tommy Pham
> -Original Message- > From: Kris Deugau [mailto:kdeu...@vianet.ca] > Sent: Thursday, December 16, 2010 11:57 AM > To: php-general@lists.php.net > Subject: [PHP] String passed to object constructor turning into an instance of > that object? > > I'm in the

[PHP] String passed to object constructor turning into an instance of that object?

2010-12-16 Thread Kris Deugau
I'm in the process of migrating customer websites off an old legacy server that's pushing EOL, and starting to show hardware failures. One site is throwing errors on what, so far as I can tell, should be perfectly working code. The original code works fine on both CentOS 3 (PHP 4.3.2) and Cen