Blick auf meiner Apache-Fehlerprotokolldatei, überprüfte ich diese Warnung:Wie kann ich die Warnung JSON_BIGINT_AS_STRING nicht implementiert beheben?
PHP Warning: json_decode(): option JSON_BIGINT_AS_STRING not implemented in /../codebird.php on line 2517
Es wird zu einem Skript bezeichnet ist, die ich Auto-Post auf Twitter verwenden, um von meinem Blog.
Dies ist der Schuldige Funktion:
protected function _parseApiReply($reply)
{
$need_array = $this->_return_format === CODEBIRD_RETURNFORMAT_ARRAY;
if ($reply === '[]') {
switch ($this->_return_format) {
case CODEBIRD_RETURNFORMAT_ARRAY:
return [];
case CODEBIRD_RETURNFORMAT_JSON:
return '{}';
case CODEBIRD_RETURNFORMAT_OBJECT:
return new \stdClass;
}
}
if (! $parsed = json_decode($reply, $need_array, 512, JSON_BIGINT_AS_STRING)) {
if ($reply) {
// assume query format
$reply = explode('&', $reply);
foreach ($reply as $element) {
if (stristr($element, '=')) {
list($key, $value) = explode('=', $element, 2);
$parsed[$key] = $value;
} else {
$parsed['message'] = $element;
}
}
}
$reply = json_encode($parsed);
}
switch ($this->_return_format) {
case CODEBIRD_RETURNFORMAT_ARRAY:
return $parsed;
case CODEBIRD_RETURNFORMAT_JSON:
return $reply;
case CODEBIRD_RETURNFORMAT_OBJECT:
return (object) $parsed;
}
return $parsed;
}
}
Warum, wenn der Titel zu lang ist, ich diese Warnung bekommen und es Post nicht auf Twitter?
P.S.
Ich habe PHP 5.5.9
installiert, aber das Problem immer noch das gleiche.
Sieht aus wie Update von PHP auf dieser Maschine seit langem überfällig ist. –
@ N.B. :) Ja, ich habe die Frage – NineCattoRules
aktualisiert. Ich bin bei 5,6 und es funktioniert, ich habe die 7 noch nicht getestet, aber ich werde raten und sagen, dass es auch dort funktioniert. –