Support » Plugins and Hacks » [Plugin: File Gallery] Parse error

[Plugin: File Gallery] Parse error

  • Hi, i have installed file galleri on my wp 3.3.1 and in top of admin i see always this message:

    Parse error: syntax error, unexpected T_STRING, expecting ')' in /myurl/domain.ext/wp-content/plugins/file-gallery/includes/media-settings.php(287) : runtime-created function on line 5

    What i can do?


Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Aesqe


    @grollaz: which version of the plugin do you have installed?

    I use the last version of plugin

    Plugin Author Aesqe


    @grollaz: I hope you’re still around, because I’d love to fix this.

    Could you please try installing the latest beta of the plugin, and tell me if you still get this notice?

    You can download it from here: http://downloads.wordpress.org/plugin/file-gallery.zip.

    Thank you! 🙂

    I tried the new version and have the same error. I am using Instant WordPress offline

    Parse error: syntax error, unexpected T_STRING, expecting ‘)’ in D:\Documents\Amanda’s Work\InstantWP_4.1\iwpserver\htdocs\wordpress\wp-content\plugins\file-gallery\includes\media-settings.php(287) : runtime-created function on line 5

    As soon as I activate the plugin the dashboard goes funky.


    Plugin Author Aesqe


    @grollaz, @amandajoonline: I haven’t been able to reproduce this error yet :/

    Which other plugins do you have installed?

    Hi guys

    We got the same error and figured out why it happened and how you can fix it.

    If you take a look at the file: plugins/file-gallery/includes/media-settings.php on line 270 (version, you’ll see this line:
    $values = isset($val['values']) ? "'" . $val['values'] . "'" : 0;

    The problem occurs if in the $val[‘values’] content a single quote is present.
    So we fixed it as follows:
    $values = isset($val['values']) ? "'" . str_replace("'", "'", $val['values']) . "'" : 0;

    I’m not 100% sure this is the actual correct way to fix it, but it seems to work perfectly fine on our site.

    Plugin Author Aesqe


    @crmart: thanks for the useful info! I’ll fix it for v1.7.5.

    Plugin Author Aesqe


    @all: please test with File Gallery v1.7.5, the problem should be fixed now.


Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: File Gallery] Parse error’ is closed to new replies.