• Resolved tfruehbeck

    (@tfruehbeck)


    in Version 3.4.1.14 I get the following error after adding images to a slide:

    Undefined variable: https://10.0.0.125/wordpress/wp-content/uploads/2020/12/Jul_2020_Tannenbaum.jpeg in /srv/www/vhosts/test/wordpress/wp-content/plugins/smart-slider-3/Nextend/Framework/Image/ImageEdit.php on line 24

    I found the following line in ImageEdit:

    23 if ($targetWidth <= 0 || $targetHeight <= 0 || !function_exists(‘imagecreatefrompng’)) {
    24 return Filesystem::pathToAbsoluteURL($$imageUrl);
    25 }

    After removing the doubled “$$” everything worked fine.
    I have no real idea, why it happens only on my host and wether the fix is correct.
    Please have a look into that.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Ramona

    (@nextend_ramona)

    Hi @tfruehbeck

    What’s the PHP version on your server? You can learn it at the Help Center > at the bottom: Debug information:
    https://smartslider.helpscoutdocs.com/article/1773-help-center

    Based on the URL, you’re trying to use an image from witing your own site. Is that correct?

    Thread Starter tfruehbeck

    (@tfruehbeck)

    Hi,
    yes, I am loading image from server-local file system.
    Versions:
    – Smart Slider 3 – version: 3.4.1.14
    – WordPress 5.6
    – PHP Version => 7.4.13
    – System => Linux 5.9.14-1-default x86_64

    Very nice debug info indeed, but too verbose to post here, sorry.

    Ramona

    (@nextend_ramona)

    Hi @tfruehbeck

    While I wasn’t able to reproduce the problem, the $$ should indeed be just $. So the code should look like this:

    if ($targetWidth <= 0 || $targetHeight <= 0 || !function_exists('imagecreatefrompng')) {
        return Filesystem::pathToAbsoluteURL($imageUrl);
    }

    I’ll have this patched in the next release, until then you can just remove one of the $-s.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Undefined variable Error in Nextend/Framework/Image/ImageEdit.php on line 24’ is closed to new replies.