PHP Warning: Illegal string offset -
i newbie in php. php migrated today 5.3.3 5.4.4 version (debian squeeze debian wheezy) and, after this, error apache log :
> php warning: illegal string offset 'phptype' in xyz
the line is:
self::$conn[$dsn['phptype']] = $mdb2; i need restore system.
<?php $a = 'hello'; echo $a['whatever']; ?> as of guys in comments saying, doing cause error. can see in example above $a string rather array. means cannot access key (if wanted 3rd letter in string ok $a[2]).
you need check self::$conn , $dsn arrays rather strings. Álvaro g. vicario says in comments, can dumping variable:
var_dump(self::$conn, $dsn)
Comments
Post a Comment