• Resolved jikamens

    (@jikamens)


    [Mon Jun 26 14:21:00 2017] [error] [client 38.140.159.10] PHP Parse error: syntax error, unexpected '[' in /var/www/html/blog/wp-content/plugins/featured-image-from-url/includes/external-post.php on line 70

    Fix:

    
    --- external-post.php~	2017-06-26 14:20:11.583030262 +0000
    +++ external-post.php	2017-06-26 14:24:20.308361745 +0000
    @@ -67,5 +67,7 @@
         $content = get_post_field('post_content', $post_id);
         $matches = array();
         preg_match_all('/<img[^>]*>/', $content, $matches);
    -    return $matches && $matches[0] ? explode('"', explode('src="', $matches[0][0])[1])[0] : null;
    +    $exp1 = explode('src="', $matches[0][0]);
    +    $exp2 = explode('"', $exp1[1]);
    +    return $matches && $matches[0] ? $exp2[0] : null;
     }
    

    Some of us are on still-supported OS releases that haven’t upgraded to PHP 5.4+. :-/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Marcel

    (@marceljm)

    Hey, @jikamens!

    Thanks for reporting. Please update to 1.5.4.

    And if the plugin is working fine now, please consider to give it a 5-star rating. =)

    Thread Starter jikamens

    (@jikamens)

    Unfortunately I cannot test because after I ran into this issue yesterday I realized just how bad of an idea it was to be using PHP 5.3 so I upgraded our site to PHP 7.0. :-/

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Version 1.5.3 introduces PHP 5.4+ dependency’ is closed to new replies.