Re: Assistance debugging php 5.x.x

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, November 22, 2005 2:37 pm, Eric wrote:
> $this->title=$this->B[$key]->title;

While this is SUPPOSED to work in PHP 5, it would be my first suspect
of under-tested code.

Try this:
$temp = $this->B[$key];
$this->title = $temp->title;

> This is not a typo, the key mysterialy changed to "Nederlancs"! The
> "d"
> became a "c".

This sounds like you treated a STRING as if it were an ARRAY.

Keep in mind that PHP is quite happy to treat STRING variables is if
they were arrays of characters.

So it's entirely possible that your code is NOT altering array
elements but is altering string characters.

It sounds like you are storing an object property sometimes as a
string, and sometimes as an array.

Don't.

Or, if you must, then you had better type-check the data every time
you use it for anything.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux