Title: Fatal error
Last modified: September 23, 2016

---

# Fatal error

 *  [trevorjoy](https://wordpress.org/support/users/trevorjoy/)
 * (@trevorjoy)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-1453/)
 * Fatal error: Can’t use function return value in write context in /home/content/
   18/10534218/html/wp-content/plugins/top-10/admin/admin.php on line 107

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

 *  [rpodsada](https://wordpress.org/support/users/rpodsada/)
 * (@rpodsada)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-1453/#post-8212798)
 * I’m getting this error too. In PHP < 5.6 (I think), the empty() function only
   accepts variables and not returns from another function.
 * So what you need to do is change line 107 from:
 * $tptn_settings[‘exclude_post_ids’] = empty( sanitize_text_field( $_POST[‘exclude_post_ids’]))?”:
   implode( ‘,’, array_map( ‘absint’, explode( ‘,’, sanitize_text_field( wp_unslash(
   $_POST[‘exclude_post_ids’] ) ) ) ) );
 * … to:
 * $exclude_post_ids_value = sanitize_text_field( $_POST[‘exclude_post_ids’] );
 * $tptn_settings[‘exclude_post_ids’] = empty( $exclude_post_ids_value ) ? ” : implode(‘,’,
   array_map( ‘absint’, explode( ‘,’, sanitize_text_field( wp_unslash( $_POST[‘exclude_post_ids’])))));
 * Basically put the result of sanitize_text_field( $_POST[‘exclude_post_ids’] )
   into a variable before you put it through empty().
 * This might not be an issue on later versions of PHP, but will likely be required
   for backwards compatibility.
 *  Plugin Author [Ajay](https://wordpress.org/support/users/ajay/)
 * (@ajay)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-1453/#post-8212894)
 * Thanks for the fix. You could potentially directly use this on line 107.
 *     ```
       $tptn_settings['exclude_post_ids'] = empty( $_POST['exclude_post_ids'] ) ? '' : implode( ',', array_map( 'absint', explode( ',', sanitize_text_field( wp_unslash( $_POST['exclude_post_ids'] ) ) ) ) );
       ```
   

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

The topic ‘Fatal error’ is closed to new replies.

 * ![](https://ps.w.org/top-10/assets/icon-256x256.png?rev=3619994)
 * [WebberZone Top 10 — Popular Posts](https://wordpress.org/plugins/top-10/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/top-10/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/top-10/)
 * [Active Topics](https://wordpress.org/support/plugin/top-10/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/top-10/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/top-10/reviews/)

## Tags

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

 * 2 replies
 * 3 participants
 * Last reply from: [Ajay](https://wordpress.org/support/users/ajay/)
 * Last activity: [9 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-1453/#post-8212894)
 * Status: not resolved