Title: Fatal error when editing/creating post
Last modified: January 8, 2017

---

# Fatal error when editing/creating post

 *  Resolved [strarsis](https://wordpress.org/support/users/strarsis/)
 * (@strarsis)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/fatal-error-when-editingcreating-post/)
 * When editing/creating a new post in WordPress admin interface,
    the post editor
   page doesn’t load and a fatal error occurs:
 *     ```
       Fatal error: Uncaught Error: [] operator not supported for strings in /var/www/web/app/plugins/event-post/eventpost.php:465 Stack trace: #0 /var/www/web/wp/wp-includes/class-wp-hook.php(298): EventPost->admin_scripts('') #1 /var/www/web/wp/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array) #2 /var/www/web/wp/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #3 /var/www/web/wp/wp-admin/admin-header.php(125): do_action('admin_print_scr...') #4 /var/www/web/wp/wp-admin/edit-form-advanced.php(473): require_once('/var/www/web/wp...') #5 /var/www/web/wp/wp-admin/post-new.php(85): include('/var/www/web/wp...') #6 {main} thrown in /var/www/web/app/plugins/event-post/eventpost.php on line 465
       ```
   
 * After disabling this plugin, the post editor page opens normally again.
    -  This topic was modified 9 years, 5 months ago by [strarsis](https://wordpress.org/support/users/strarsis/).

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

 *  Thread Starter [strarsis](https://wordpress.org/support/users/strarsis/)
 * (@strarsis)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/fatal-error-when-editingcreating-post/#post-8631539)
 * This is because of a change in PHP 7.1.0 ([https://github.com/spotweb/spotweb/issues/243#issuecomment-265461670](https://github.com/spotweb/spotweb/issues/243#issuecomment-265461670)):
 * >  The empty index operator (e.g. $str[] = $x) is not supported for strings
   >  
   > anymore, and throws a fatal error instead of silently converting to array.
 * This can be fixed by adding a line to initialize the array first
     $deps = [];
   directly above the existing line at (plugins/)event-post/eventpost.php:465 :  
   $deps[] = ‘jquery-ui-datepicker’;  Then lines 465-466 will look like:  $deps 
   = []; $deps[] = ‘jquery-ui-datepicker’;
 * Then the plugin seems to work.
 *  Plugin Author [Bastien Ho](https://wordpress.org/support/users/bastho/)
 * (@bastho)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-when-editingcreating-post/#post-8934041)
 * thank you for the report and the solution, a fix have been added for the next
   release.
 *  Plugin Author [Bastien Ho](https://wordpress.org/support/users/bastho/)
 * (@bastho)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-when-editingcreating-post/#post-8964094)
 * Done 😉

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

The topic ‘Fatal error when editing/creating post’ is closed to new replies.

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

## Tags

 * [editor](https://wordpress.org/support/topic-tag/editor/)
 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)
 * [post-editor](https://wordpress.org/support/topic-tag/post-editor/)

 * 3 replies
 * 2 participants
 * Last reply from: [Bastien Ho](https://wordpress.org/support/users/bastho/)
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-when-editingcreating-post/#post-8964094)
 * Status: resolved