Title: Update &#8211; error 500
Last modified: November 18, 2016

---

# Update – error 500

 *  Resolved [kulturbrigad](https://wordpress.org/support/users/kulturbrigad/)
 * (@kulturbrigad)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/update-error-500/)
 * Hello,
    I just updated this plugin, and it made error 500. I had to switch off
   the plugin. Can you help me, why is that happened? Thanks, istvan

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

 *  Thread Starter [kulturbrigad](https://wordpress.org/support/users/kulturbrigad/)
 * (@kulturbrigad)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/update-error-500/#post-8454904)
 * this plugin generates fatal error:
    “Fatal error: Can’t use function return value
   in write context in /home/thsiubkw/public_html/wp-content/plugins/staff-directory/
   classes/staff-directory-shortcode.php on line 91”
 *  [jeremyempie](https://wordpress.org/support/users/jeremyempie/)
 * (@jeremyempie)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/update-error-500/#post-8458119)
 * Me too
 *  [dmkjr](https://wordpress.org/support/users/dmkjr/)
 * (@dmkjr)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/update-error-500/#post-8458491)
 * Yeah, this release messed up a lot of things. I had to revert myself.
 * -Shortcodes stopped working.
    -Script bled over to other custom_post_types making
   other things not function. -Removes template tags and basically strips CSS from
   page.
 *  [GBCadmin](https://wordpress.org/support/users/gbcadmin/)
 * (@gbcadmin)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/update-error-500/#post-8460695)
 * Same issue here. Restored from backup to recover.
 *  [mandikaye](https://wordpress.org/support/users/mandikaye/)
 * (@mandikaye)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/update-error-500/#post-8464647)
 * My whole site went down with this update. Disabled the plugin by renaming the
   source folder and got everything back up and running – but I’d definitely like
   a working version of this restored.
 * Thanks!
 *  [daymobrew](https://wordpress.org/support/users/daymobrew/)
 * (@daymobrew)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/update-error-500/#post-8468802)
 * Same issue here.
    I reverted to 1.0.3.
 * I am on PHP 5.4.45.
 * [http://stackoverflow.com/questions/1532693/weird-php-error-cant-use-function-return-value-in-write-context](http://stackoverflow.com/questions/1532693/weird-php-error-cant-use-function-return-value-in-write-context)
   
   The issue seems to be because of the use of ’empty’, a “language construct” that
   can only take variables. The empty() documentation says to test for ‘false’ for
   pre-5.5 versions. [http://php.net/manual/en/function.empty.php](http://php.net/manual/en/function.empty.php)
 * The solution that works for me is to change:
    if(!empty(self::photo_url_shortcode())){
   to if(self::photo_url_shortcode() == false){ on line 91 of staff-directory/classes/
   staff-directory-shortcode.php
 * I will submit a pull request on GitHub.
 *  [daymobrew](https://wordpress.org/support/users/daymobrew/)
 * (@daymobrew)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/update-error-500/#post-8468826)
 * Pull request: [https://github.com/adamtootle/staff-directory/pull/16](https://github.com/adamtootle/staff-directory/pull/16)
 *  [daymobrew](https://wordpress.org/support/users/daymobrew/)
 * (@daymobrew)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/update-error-500/#post-8469671)
 * I had a mistake in my code – I was checking for an empty string instead of a 
   non-empty string.
 * Adam has committed a change on GitHub
    [https://github.com/adamtootle/staff-directory/blob/master/classes/staff-directory-shortcode.php](https://github.com/adamtootle/staff-directory/blob/master/classes/staff-directory-shortcode.php)
 * He changed:
    if(!empty(self::photo_url_shortcode())){ to: $photo_url = self::
   photo_url_shortcode(); if(!empty($photo_url)){
 *  [Jaap de Wit](https://wordpress.org/support/users/hitec4ever/)
 * (@hitec4ever)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/update-error-500/#post-8472482)
 * Hi, I’ve changed the code according the github link. The plugin is working after
   that but creating or edditing posts and pages result in fatal error. (Divi theme).
 * After disabling the staff directory plugin everything works again.
 * Can the plugin be fixed? Latest version is also not working.
 *  [daymobrew](https://wordpress.org/support/users/daymobrew/)
 * (@daymobrew)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/update-error-500/#post-8476307)
 * [@japp](https://wordpress.org/support/users/japp/): What is the error message?
   
   What version of PHP is your site on?
 *  [Jaap de Wit](https://wordpress.org/support/users/hitec4ever/)
 * (@hitec4ever)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/update-error-500/#post-8477353)
 * [@daymobrew](https://wordpress.org/support/users/daymobrew/), it’s version PHP
   Version 5.3.29
 *  [daymobrew](https://wordpress.org/support/users/daymobrew/)
 * (@daymobrew)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/update-error-500/#post-8483881)
 * What is the fatal error?
    Can you look at your server logs and copy the error
   messages here.
 * One could argue that Divi is breaking the plugin 😉
 *  [RGW](https://wordpress.org/support/users/horburygoffe/)
 * (@horburygoffe)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/update-error-500/#post-8556612)
 * I had this error and I commented out the section that was causing the problem,
   which seems to be to do with the photo. As I don’t use photos in my directory
   this isn’t important to me. For those that don’t know, to comment out you just
   add /* at the start and */ at the end.
 * So add /* at the start of line 90 and */ at the end of line 96.
 * I guess if you just wanted to get your site back online this would work but maybe
   the photos would disappear. Better than removing the whole directory if the directory
   is really important to your site.
    -  This reply was modified 9 years, 6 months ago by [RGW](https://wordpress.org/support/users/horburygoffe/).
 *  Plugin Author [adamtootle](https://wordpress.org/support/users/adamtootle/)
 * (@adamtootle)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/update-error-500/#post-8815239)
 * I released a fix for this tonight. Sorry guys.

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

The topic ‘Update – error 500’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/staff-directory_a19d9e.svg)
 * [Staff Directory](https://wordpress.org/plugins/staff-directory/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/staff-directory/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/staff-directory/)
 * [Active Topics](https://wordpress.org/support/plugin/staff-directory/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/staff-directory/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/staff-directory/reviews/)

 * 14 replies
 * 9 participants
 * Last reply from: [adamtootle](https://wordpress.org/support/users/adamtootle/)
 * Last activity: [9 years, 3 months ago](https://wordpress.org/support/topic/update-error-500/#post-8815239)
 * Status: resolved