Title: PHP Warning: usort():
Last modified: August 22, 2016

---

# PHP Warning: usort():

 *  [tetontrekker](https://wordpress.org/support/users/tetontrekker/)
 * (@tetontrekker)
 * [11 years ago](https://wordpress.org/support/topic/php-warning-usort/)
 * I don’t seem to be having any problems with the NextGen plug in or any of my 
   public galleries but I keep getting warnings in my error log, the time in my 
   error log is not set to my time zone but these just happened. I posted the last
   few, but I have 22 since yesterday. I have been installing the NextGen updates
   as soon as I see them on my list.
 * Mar 20, 21:51:45 PHP Warning: usort(): Array was modified by the user comparison
   function in /wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/
   nextgen_gallery_display/package.module.nextgen_gallery_display.php on line 995
   
   Mar 20, 21:51:45 PHP Warning: usort(): Array was modified by the user comparison
   function in /wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/
   nextgen_gallery_display/package.module.nextgen_gallery_display.php on line 995
   Mar 20, 21:51:59 PHP Warning: usort(): Array was modified by the user comparison
   function in /wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/
   nextgen_gallery_display/package.module.nextgen_gallery_display.php on line 995
   Mar 20, 21:51:59 PHP Warning: usort(): Array was modified by the user comparison
   function in /wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/
   nextgen_gallery_display/package.module.nextgen_gallery_display.php on line 995
   Mar 20, 21:51:59 PHP Warning: usort(): Array was modified by the user comparison
   function in /wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/
   nextgen_gallery_display/package.module.nextgen_gallery_display.php on line 995
   Mar 20, 21:51:59 PHP Warning: usort(): Array was modified by the user comparison
   function in /wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/
   nextgen_gallery_display/package.module.nextgen_gallery_display.php on line 995
 * [https://wordpress.org/plugins/nextgen-gallery/](https://wordpress.org/plugins/nextgen-gallery/)

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

 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [11 years ago](https://wordpress.org/support/topic/php-warning-usort/#post-5923214)
 * [@tetontrekker](https://wordpress.org/support/users/tetontrekker/) – As we have
   not had a report of this message being written to error_log files before, do 
   you know what operations you are doing when they are being created?
 * – Cais.
 *  Thread Starter [tetontrekker](https://wordpress.org/support/users/tetontrekker/)
 * (@tetontrekker)
 * [11 years ago](https://wordpress.org/support/topic/php-warning-usort/#post-5923216)
 * I’m using it with a custom theme.
    [http://jhcband.org/photo-albums/](http://jhcband.org/photo-albums/)
 * It looks like it happens when the page (or any of the albums) get a hit. I watch
   who’s on line when I’m working on pages, it looks like it happens when bots hit
   it too. This is new, it started after one of the recent updates.
 * My Query Monitor also has a PHP warning on that page:
 * Warning usort(): Array was modified by the user comparison function 2 wp-content/
   plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_gallery_display/
   package.module.nextgen_gallery_display.php:995 usort()
    Mixin_Displayed_Gallery_Queries-
   >_entities_to_galleries_and_albums() ReflectionMethod->invokeArgs() ExtensibleObject-
   >_exec_cached_method() ExtensibleObject->__call() C_Displayed_Gallery->_entities_to_galleries_and_albums()
   Mixin_Displayed_Gallery_Queries->_get_album_and_gallery_entities() ReflectionMethod-
   >invokeArgs() ExtensibleObject->_exec_cached_method() ExtensibleObject->__call()
   C_Displayed_Gallery->_get_album_and_gallery_entities() Mixin_Displayed_Gallery_Queries-
   >get_entities() ReflectionMethod->invokeArgs() ExtensibleObject->_exec_cached_method()
   ExtensibleObject->__call() C_Displayed_Gallery->get_entities() Mixin_Displayed_Gallery_Queries-
   >get_included_entities() ReflectionMethod->invokeArgs() ExtensibleObject->_exec_cached_method()
   ExtensibleObject->__call() C_Displayed_Gallery->get_included_entities() A_NextGen_Basic_Album_Controller-
   >index_action() ReflectionMethod->invokeArgs() ExtensibleObject->_exec_cached_method()
   ExtensibleObject->__call() C_Display_Type_Controller->index_action() Mixin_Displayed_Gallery_Renderer-
   >render() ReflectionMethod->invokeArgs() ExtensibleObject->_exec_cached_method()
   ExtensibleObject->__call() ExtensibleObject->call_method() Mixin->call_parent()
   A_NextGen_Basic_Album_Routes->render() ReflectionMethod->invokeArgs() ExtensibleObject-
   >_exec_cached_method() ExtensibleObject->__call() C_Displayed_Gallery_Renderer-
   >render() Mixin_Displayed_Gallery_Renderer->display_images() ReflectionMethod-
   >invokeArgs() ExtensibleObject->_exec_cached_method() ExtensibleObject->__call()
   C_Displayed_Gallery_Renderer->display_images() M_NextGen_Basic_Album->ngglegacy_shortcode()
   C_NextGen_Shortcode_Manager->callback_wrapper() C_NextGen_Shortcode_Manager->
   __call() C_NextGen_Shortcode_Manager->album__callback() do_shortcode_tag() preg_replace_callback()
   do_shortcode() Plugin: nextgen-gallery
 * I hope this helps,
    Julie
 *  Thread Starter [tetontrekker](https://wordpress.org/support/users/tetontrekker/)
 * (@tetontrekker)
 * [11 years ago](https://wordpress.org/support/topic/php-warning-usort/#post-5923219)
 * It must be a conflict with another plug in. I’m using Next Gen on 2 other sites,
   I just did the updates and and it is not getting any errors or warnings.
 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [11 years ago](https://wordpress.org/support/topic/php-warning-usort/#post-5923221)
 * [@tetontrekker](https://wordpress.org/support/users/tetontrekker/) – Let us know
   what you find after checking for plugin conflicts … as it is, there is nothing
   specific in the log you pasted that points to anything in particular.
 * Thanks!
 * – Cais.

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

The topic ‘PHP Warning: usort():’ is closed to new replies.

 * ![](https://ps.w.org/nextgen-gallery/assets/icon-256x256.png?rev=2083961)
 * [Photo Gallery, Sliders, Proofing and Themes - NextGEN Gallery](https://wordpress.org/plugins/nextgen-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextgen-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextgen-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/nextgen-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextgen-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextgen-gallery/reviews/)

## Tags

 * [usort](https://wordpress.org/support/topic-tag/usort/)

 * 4 replies
 * 2 participants
 * Last reply from: [photocrati](https://wordpress.org/support/users/photocrati/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/php-warning-usort/#post-5923221)
 * Status: not resolved