Forum Moderators: coopster
() Creating default object from empty value
Code:
// Get the next token in the sequence
for ($i = count($Tokens)-1; $i >= 0 ; $i--){
// Find the position in the string
$start = strpos($thisString, $Tokens[$i]);
// If it's present
if ($start!== false){
// Record position and token name
$resultArray[$i]->start = $start;
$resultArray[$i]->token = $Tokens[$i];
}
}
It says the line causing it is the first $result[$i] line.
Any ideas why?
If the $resultArray[$i] value is not an instance of a class, then I would expect you will indeed get a fatal error. Try var_dump() on that value and see if it is an object.