I don't understand the question. One should always check the existence of something before attempting to use it.
If (isset($var) && gettype($var) == "boolean") is one way of type checking. "Christian Jul Jensen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi > > In PHP5 the behaviour of illegal string offsets has changed. This is > documented in the 'thin changes' file. > > This gives a problem in checking for existence / types of values, > directly into a deeper level of a multidimensional array. > > I reported this as a bug[1] because I find the behaviour unfortunate, and > furthermore it's inconsistent. This was refused, with a note 'So don't > do it'. I think it's a really bad idea not to check the > existence/types of values, before using them, so how should this be done > properly in PHP5, without risking fatal errors in the case of a > non-existent array? > > This is a problem in migrating applications from PHP4 because the > error will not appear unless the value deosn't exist, which is exactly > why you do the check. > > [1] http://bugs.php.net/bug.php?id=28107 > > -- > ./mvh Christian Jul Jensen > Frelance webprogrammer > TYPO3 Typehead Denmark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php