[SPIP Zone] CVS IMPORT Fatal error: Uncaught Error: [] operator not supported for strings in…

Stackoverflow est ton ami

https://stackoverflow.com/questions/5879675/problem-with-fatal-error-operator-not-supported-for-strings-in

You get this error when attempting to use the short array push syntax on a string.
For example, this
$foo = 'foo';
$foo[] = 'bar'; // ERROR!

Et effectivement dans la ligne 89 il suffit de remplacer
$vals = '';
par
$vals = [];

Puis tout marche à la perfection sur SPIP 3.2.3 SVN [24210]
exception faite des quelques problèmes de affichage CSS dans le privé.
En tout cas c'est ce que j'ai vu.

Je commite ?

A +

Luis Speciale a écrit le 30/01/2019 à 12:57 :

Stackoverflow est ton ami

php - Fatal error: [] operator not supported for strings - Stack Overflow

You get this error when attempting to use the short array push syntax on a string.
For example, this
$foo = 'foo';
$foo = 'bar'; // ERROR!

Et effectivement dans la ligne 89 il suffit de remplacer
$vals = '';
par
$vals = ;

Cette syntaxe ne marchera pas avec php<5.4 (standards - PHP array vs [ ] in method and variable declaration - Stack Overflow)

Donc :
$vals = array();

Sera plus respectueux de l'écosystème de SPIP :wink:

--
RealET

Le 31/01/2019 à 15:44, RealET a écrit :

Luis Speciale a écrit le 30/01/2019 à 12:57 :

Stackoverflow est ton ami

php - Fatal error: [] operator not supported for strings - Stack Overflow

You get this error when attempting to use the short array push syntax on a string.
For example, this
$foo = 'foo';
$foo = 'bar'; // ERROR!

Et effectivement dans la ligne 89 il suffit de remplacer
$vals = '';
par
$vals = ;

Cette syntaxe ne marchera pas avec php<5.4 (standards - PHP array vs [ ] in method and variable declaration - Stack Overflow)

Donc :
$vals = array();

Sera plus respectueux de l'écosystème de SPIP :wink:

Gracias, J!
Je crois que c'est par là que j'ai de la lecture en perspective

Alors, c'est valable pour commiter ?

A +

Le 31/01/2019 à 15:44, RealET a écrit :

$vals = ;

Cette syntaxe ne marchera pas avec php<5.4

Mouais… enfin PHP 5.4 maintenant… comment dire…
:slight_smile:

MM.

Matthieu Marcillaud a écrit le 01/02/2019 à 18:14 :

Le 31/01/2019 à 15:44, RealET a écrit :

$vals = ;

Cette syntaxe ne marchera pas avec php<5.4

Mouais… enfin PHP 5.4 maintenant… comment dire…
:slight_smile:

Je suis d'accord avec toi.
Puis je regarde https://stats.spip.net/
5.4 1484 (8.5%)
5.3 1558 (8.9%)
5.2 984 (5.6%)
5.1 1187 (6.8%)
5.0 1 (0%)
4.4 2618 (14.9%)
4.3 4 (0%)

--
RealET