• Resolved afki

    (@afki)


    After today’s update i got two errors:
    On first website there is: Parse error: syntax error, unexpected ‘[‘ in /home/…/WWW/wp-content/plugins/slide-anything/php/slide-anything-frontend.php on line 682
    And on second:
    HTTP ERROR 500

Viewing 14 replies - 1 through 14 (of 14 total)
  • I have this error too after today’s update

    // ### STRIP JAVASCRIPT (‘<script>’ tags) FROM SUPPLIED STRING ARGUMENT ###
    function remove_javascript_from_content($slide_content) {
    $dom = new DOMDocument();
    $dom->loadHTML($slide_content);
    $script = $dom->getElementsByTagName(‘script’);
    $remove = [];
    foreach($script as $item) {
    $item->parentNode->removeChild($item);
    }
    $slide_content = $dom->saveHTML();
    return $slide_content;
    }
    ?>

    error in “$remove = [];”

    After Update i get an HTTP ERROR 500 too. Please fix this Problem. Thanks!

    Also getting the above error..

    Plugin could not be activated because it triggered a fatal error.
    Parse error: syntax error, unexpected ‘[‘ in /var/www/vhosts/********/httpdocs/wp-content/plugins/slide-anything/php/slide-anything-frontend.php on line 682

    I get the same problem.

    Parse error: syntax error, unexpected ‘[‘ in D:\Hosting\xxxxxxx\html\blog\wp-content\plugins\slide-anything\php\slide-anything-frontend.php on line 682

    I have this running on Windows server with PHP 5.6 but I know it has worked before on the same server.

    Thank you.

    UPDATE:

    I found that I was running WP 4.9.8 on PHP 5.2.17. Since this is a Windows hosted server I can only go up to PHP 5.6. That seems to work. I am able to activate my plugin.

    Please note that I have no intentions to remain on a Windows server. I just want to get WP updated and migrate it over to a Linux server where there is php 7 support.

    Note that the site is hosted on GoDaddy. I don’t know if that makes a difference or not but it would not hurt to check your php version setting.

    Please use

    $remove = array();

    instead of

    $remove = [];

    for backward compatibility…

    Please tell me, what the Problem is? PHP Version, MySQL Version?

    I’m sorry, im not a programmer. Which file ich need to edit?

    Thank you!

    It was more a suggestion to the developers…
    My 2 cents to help backward compatibility ??

    Thanks
    Ale

    What’s disturbing is that for those that have this issue seems to be related to php compatibility issue or at least that is the case on my end. Anything before PHP 5.4 seems to break it on my server. Since the latest version of WordPress is recommending PHP7 (at the very least 5.6), one should look into the hosting provider’s PHP version to see if they have a higher version of PHP. If not, time to find another host.

    • This reply was modified 6 years, 2 months ago by tkgnewseed.
    Plugin Author simonpedge

    (@simonpedge)

    Thanks tetemlik, tkgnewseed, aleflocco for identifying this backwards compatibility issue. I have amended this array definition line to now be:
    $remove = array();
    In release 2.1.13 of Slide Anything, which I have uploaded today.

    Thank you simonpedge for your fast response. I confirm it is working on my setup.

    Ale

    Plugin Author simonpedge

    (@simonpedge)

    Thanks aleflocco, I’ll mark this as resolved.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Errors afer update’ is closed to new replies.