'Parse error: syntax error, unexpected T_LNUMBER, expecting T_STRING or T_VARIABLE or '{' or '$' in core\cake\basics.php on line 118
Parse error: syntax error, unexpected T_LNUMBER, expecting T_STRING or T_VARIABLE or '{' or '$' in core\cake\basics.php on line 118 ) please some one help me.
}
function pluginSplit($name, $dotAppend = false, $plugin = null) {
if (strpos( $name, '.' ) !== false) {
$parts = explode( '.', $name, 2 );
if ($dotAppend) {
$parts->0 .= '.';
}
return $parts;
}
Solution 1:[1]
I assume that the error is occurring here:
$parts->0 .= '.';
If you're trying to access the 0th element of the array, the proper syntax is $parts[0].
Solution 2:[2]
This Error occurs when we try to access value with Numeric numbers like $parts->0 .= '.'; or $parts->324 .= '.';.
If you will write code like this $parts->abc .= '.';, we won't get this error.
I'm facing the same issue and haven't got any solution yet.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Ben |
| Solution 2 | ouflak |
