Title: Fatal Error in Debug Mode
Last modified: September 28, 2023

---

# Fatal Error in Debug Mode

 *  Resolved [typeless](https://wordpress.org/support/users/jbalyo/)
 * (@jbalyo)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/fatal-error-in-debug-mode-2/)
 * The latest published version of Document Gallery (4.4.3) produces a Fatal Error
   whenever WordPress is in Debug mode. I tracked this down to a misuse of the implode
   function here:
 * **/inc/class-gallery.php – Line 542:**
 *     ```wp-block-code
       $comment .= '<!-- Attachment IDs: ' . implode( $ids, ', ' ) . ' -->' . PHP_EOL;
       ```
   
 * PHP documentation states that implode() takes a separator and an array, in that
   order. So the above should be:
 *     ```wp-block-code
       $comment .= '<!-- Attachment IDs: ' . implode( ', ', $ids ) . ' -->' . PHP_EOL;
       ```
   
 * **EDIT**: I see this bug was fixed in 4.4.4 – but this version is only in the
   repository – not yet published. Is this version still in development? When can
   we hope to see it pushed live?
    -  This topic was modified 2 years, 8 months ago by [typeless](https://wordpress.org/support/users/jbalyo/).

Viewing 1 replies (of 1 total)

 *  Plugin Author [Dan Rossiter](https://wordpress.org/support/users/danrossiter/)
 * (@danrossiter)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-in-debug-mode-2/#post-17244176)
 * Hi [@jbalyo](https://wordpress.org/support/users/jbalyo/) –
 * Apologies for the delayed response! My email notifications were not working how
   I expected them to and never saw this post 🙁
 * Yes, 4.4.4 fixed this. Unfortunately, I made an oopsie when publishing that version
   and it never made it out to the public until about 10m ago. Should be available
   now – apologies for the inconvenience!
 * -Dan

Viewing 1 replies (of 1 total)

The topic ‘Fatal Error in Debug Mode’ is closed to new replies.

 * ![](https://ps.w.org/document-gallery/assets/icon.svg?rev=983329)
 * [Document Gallery](https://wordpress.org/plugins/document-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/document-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/document-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/document-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/document-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/document-gallery/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Dan Rossiter](https://wordpress.org/support/users/danrossiter/)
 * Last activity: [2 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-in-debug-mode-2/#post-17244176)
 * Status: resolved