Title: Developer: Fix for static function photo_shortcode()
Last modified: February 16, 2017

---

# Developer: Fix for static function photo_shortcode()

 *  Resolved [knwilson](https://wordpress.org/support/users/knwilson/)
 * (@knwilson)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/developer-fix-for-static-function-photo_shortcode/)
 * [@adamtootle](https://wordpress.org/support/users/adamtootle/) are you going 
   to be updating the
 *     ```
       static function photo_shortcode(){
         $imagepath = self::photo_url_shortcode();
               if(!empty( $imagepath)){
                   return '<img src="' . self::photo_url_shortcode() . '" />';
               } else {
                   return "";
               }
           }
       ```
   
 * so that it no longer throws errors for older versions of PHP? Something like 
   below. Your current version fatally errors. I work at Purdue and I’d like to 
   continue to use your plugin but cannot if the future version does not fix the
   issue. Please respond soon. Thanks.
 *     ```
       static function photo_shortcode(){
         $imagepath = self::photo_url_shortcode();
               if(!empty( $imagepath)){
                   return ‘<img src="' . self::photo_url_shortcode() . '" />';
               } else {
                   return "";
               }
           }
       ```
   

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

 *  Thread Starter [knwilson](https://wordpress.org/support/users/knwilson/)
 * (@knwilson)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/developer-fix-for-static-function-photo_shortcode/#post-8812944)
 * Sorry, I copied the fix twice. Your current code is
 *     ```
           static function photo_shortcode(){
               if(!empty(self::photo_url_shortcode())){ <- This is line 91
                   return '<img src="' . self::photo_url_shortcode() . '" />';
               } else {
                   return "";
               }
           }
       ```
   
 *  Plugin Author [adamtootle](https://wordpress.org/support/users/adamtootle/)
 * (@adamtootle)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/developer-fix-for-static-function-photo_shortcode/#post-8815221)
 * I released a fix for this tonight.

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

The topic ‘Developer: Fix for static function photo_shortcode()’ 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/)

## Tags

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

 * 2 replies
 * 2 participants
 * Last reply from: [adamtootle](https://wordpress.org/support/users/adamtootle/)
 * Last activity: [9 years, 3 months ago](https://wordpress.org/support/topic/developer-fix-for-static-function-photo_shortcode/#post-8815221)
 * Status: resolved