WordPress.org

Ready to get started?Download WordPress

Forums

File Gallery
[resolved] Call-time pass-by-reference has been removed in PHP 5.4 (6 posts)

  1. kraterdesign
    Member
    Posted 2 years ago #

    Hello,

    I upgraded PHP the other day from v5.3 to v5.4.3 and my WP site would no longer load (blank/white screen).

    The php error log had this to say:
    PHP Fatal error: Call-time pass-by-reference has been removed; If you would like to pass argument by reference, modify the declaration of do_action(). in /[...]/wp/wp-content/plugins/file-gallery/includes/attachments.php on line 710

    Whenever you need to pass an argument by reference, just wrap it in an array, like so:
    do_action('file_gallery_delete_all_attachment_copies', $attachment_id, array(&$copies));

    And fix for same error on line 761 of same file:
    do_action('file_gallery_promote_first_attachment_copy', $attachment_id, array(&$promoted_id));

    PS. this has been proper way of pass-by-ref for a long time now, see:
    http://core.trac.wordpress.org/ticket/1583
    http://core.trac.wordpress.org/changeset/2798

    Using File-Gallery v1.7.4.1
    http://wordpress.org/extend/plugins/file-gallery/

  2. Mridul Gupta
    Member
    Posted 2 years ago #

    You have no idea how much trouble you saved me! I created a login just to thank you! I was having the exact same issue and was going nuts.. Resolved now, whew!!

  3. craig-mac
    Member
    Posted 2 years ago #

    Thanks! Huge help.

  4. Aesqe
    Member
    Plugin Author

    Posted 2 years ago #

    @everybody: it will be fixed in v1.7.5 of the plugin, coming soon.

    sorry I haven't updated it yet, but my free time has been non-existent for a while now. I'll try to release it this weekend.

  5. 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

  6. kraterdesign
    Member
    Posted 2 years ago #

    Confirmed fixed, thanks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic