HtmLaw.php

HtmLaw.php

matolamatola Posts: 23Questions: 6Answers: 1

<b>Parse error</b>: syntax error, unexpected '[' in <b>/home/d37109/public_html/php/lib/Vendor/Htmlaw.php</b> on line <b>39</b><br />

Above is the response from the production server. It works on localhost.

Any suggestions?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,744Questions: 1Answers: 10,111 Site admin
    Answer ✓

    Sorry - that is an error in the Editor 1.5.2 package that makes it incompatible with PHP 5.3.

    There are three changes that need to be made:

    -    public static $defaultConfig = [
    -        'anti_link_spam' => ['`.`', ''],
    +    public static $defaultConfig = array(
    +        'anti_link_spam' => array('`.`', ''),
    
    -    ];
    +    );
     
    -    public static $defaultSpec = [
    +    public static $defaultSpec = array(
             'object=-classid-type, -codebase',
             'embed=type(oneof=application/x-shockwave-flash)'
    -    ];
    +    );
    
    -            'anti_link_spam' => ['`.`', ''],
    +            'anti_link_spam' => array('`.`', ''),
    

    I'm going to release Editor 1.5.3 with these fixes in the next few days.

    Of course, another option would be to update the PHP install since 5.3 was EOL in 2014. I realise that isn't always possible of course though!

    Regards,
    Allan

  • matolamatola Posts: 23Questions: 6Answers: 1

    Thank you very much, Allan, for your prompt reply. That solved it.
    I have recommended a PHP upgrade to our web hotel.

  • SteveWalkerSteveWalker Posts: 1Questions: 0Answers: 0

    Had the same problem after download editor, fixed the problem, great quick response.

This discussion has been closed.