Opened 2 weeks ago

Closed 13 days ago

#1733 closed defect (fixed)

SOS PHP 7.4 - Xinha Plugin Configuration

Reported by: guest Owned by:
Priority: normal Milestone:
Component: Plugins Version: trunk
Severity: blocker Keywords:
Cc: gcwebbox, @…, tiscali.it

Description

Hello,

maybe it could be useful to others ...

going from php 7.3 to php 7.4
the configuration file of my plugins
(created as "examples/UsingPhpPlugins.php")
it stopped working, so it loaded the default

(console reports: "SyntaxError?: expected expression, got '<' XinhaEasy?.js:57:77" etc.)

I use both the "MootoolsFileManager?" plugin and the "Linker" plugin and the problem was concentrated there

I solved my problem by correcting:

"Xinha/contrib/php-xinha.php"
on row 468,
replacing the braces with the square brackets:

$ last = strtolower ($ val {strlen ($ val) -1});

becomes

$ last = strtolower ($ val [strlen ($ val) -1]);

and in the same way

"Xinha/plugins/MootoolsFileManager/mootools-filemanager/Assets/Connector/FileManager.php"
on row 5408

$ returnstring. = htmlentities ($ variable {$ i}, ENT_QUOTES, 'UTF-8');

becomes

$ returnstring. = htmlentities ($ variable [$ i], ENT_QUOTES, 'UTF-8');

The probable cause is that in php 7.4 the braces in the arrays are no longer tolerated (error: Array and string offset access syntax with curly braces is deprecated)

Change History (1)

comment:1 Changed 13 days ago by gogo

  • Resolution set to fixed
  • Status changed from new to closed

Cheers, fixed in changeset:1454

Note: See TracTickets for help on using tickets.