WordPress.org

Ready to get started?Download WordPress

Forums

File Gallery
Parse error (9 posts)

  1. grollaz
    Member
    Posted 2 years ago #

    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?
    Thanks

    http://wordpress.org/extend/plugins/file-gallery/

  2. Aesqe
    Member
    Plugin Author

    Posted 2 years ago #

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

  3. grollaz
    Member
    Posted 2 years ago #

    I use the last version of plugin

  4. Aesqe
    Member
    Plugin Author

    Posted 2 years ago #

    @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! :)

  5. amandajoonline
    Member
    Posted 2 years ago #

    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.

    -Thanks!
    Amanda

  6. Aesqe
    Member
    Plugin Author

    Posted 2 years ago #

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

    Which other plugins do you have installed?

  7. crmart
    Member
    Posted 2 years ago #

    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 1.7.4.1), 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.

  8. Aesqe
    Member
    Plugin Author

    Posted 2 years ago #

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

  9. Aesqe
    Member
    Plugin Author

    Posted 2 years ago #

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

    http://wordpress.org/support/topic/please-test-file-gallery-175

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic