You are here: Re: [PHP] Assistance debugging php 5.x.x « PHP « IT news, forums, messages
Re: [PHP] Assistance debugging php 5.x.x

Posted by "Richard Lynch" on 11/22/05 23:35

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация