Title: PHP errors
Last modified: August 30, 2016

---

# PHP errors

 *  [maxwelton](https://wordpress.org/support/users/maxwelton/)
 * (@maxwelton)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/php-errors-57/)
 * The following error produces PHP warnings in debug mode:
 * **file:** gotowp_personal.php
    **function:** gotowp_has_shortcode **line:** 891
 * This code can be called on pages without $post content, such as 404 pages which
   have sidebars that use post data. As such, line 891:
 * `if( has_shortcode( $post->post_content, $shortcode) )`
 * will create a notice for the missing object `$post`.
 * **fix:** Add this code after line 888:
 * `if ( empty($post) ) return $found;`
 * —
 * In addition, it looks like the custom function you include at line 908, `gotowp_custom_has_shortcode`
   is missing the parameter in the function declaration:
 * `function gotowp_custom_has_shortcode(){`
 * Should be:
 * `function gotowp_custom_has_shortcode( $shortcode ){`
 * [https://wordpress.org/plugins/gotowp/](https://wordpress.org/plugins/gotowp/)

The topic ‘PHP errors’ is closed to new replies.

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

 * 0 replies
 * 1 participant
 * Last reply from: [maxwelton](https://wordpress.org/support/users/maxwelton/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/php-errors-57/)
 * Status: not resolved