Title: Undefined Offset
Last modified: August 31, 2016

---

# Undefined Offset

 *  Resolved [KTS915](https://wordpress.org/support/users/kts915/)
 * (@kts915)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/undefined-offset-17/)
 * Testing PHP7 on localhost, I am getting an “undefined offset” warning for line
   116 of `newstatpress/includes/nsp_functions-extra.php`.
 * I think the solution is to change that line from
    `list($null,$q)=explode("?",
   $url);` to `list($null,$q)=array_pad(explode("?",$url,2), 2, null);`
 * [https://wordpress.org/plugins/newstatpress/](https://wordpress.org/plugins/newstatpress/)

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

 *  Plugin Contributor [lechab](https://wordpress.org/support/users/lechab/)
 * (@lechab)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/undefined-offset-17/#post-7258644)
 * Hi KTS915,
    Thank you to report. The plugin was not tested with PHP7. We will
   check if your correction works well with old php version and integrate it in 
   next version. See you, cHab
 *  Thread Starter [KTS915](https://wordpress.org/support/users/kts915/)
 * (@kts915)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/undefined-offset-17/#post-7258881)
 * I see it’s now in the latest version — thanks!
 * There is another change that you might like to make in the next version because`
   get_currentuserinfo()` was deprecated in WP 4.5.
 * There are three instances of it in `/newstatpress/newstatpress.php`. These need
   to be replaced with `wp_get_current_user()`.
 * Thanks again!
 *  Plugin Contributor [lechab](https://wordpress.org/support/users/lechab/)
 * (@lechab)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/undefined-offset-17/#post-7258883)
 * Hi,
 * No problem 🙂
    Thank you to report here, it will be change in the next version
   so. Stay tuned. cHab

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

The topic ‘Undefined Offset’ is closed to new replies.

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

 * 3 replies
 * 2 participants
 * Last reply from: [lechab](https://wordpress.org/support/users/lechab/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/undefined-offset-17/#post-7258883)
 * Status: resolved