Title: PHP Notice: Undefined offset
Last modified: November 25, 2020

---

# PHP Notice: Undefined offset

 *  Resolved [timjh](https://wordpress.org/support/users/timjh/)
 * (@timjh)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/php-notice-undefined-offset-10/)
 * I get
 * PHP Notice Undefined offset: 1 in /var/www/sib2/wp-content/plugins/os-datahub-
   maps/include/osmap-shortcode.php on line 131
 * when working with a markerfile that has markers with an empty description field.(
   WordPress 5.5.3 with PHP 7.4.3)
 * I suggest `$result[2] = $split[1] ?? '';`
    rather than `$result[2] = ( $split[
   1] ? : '' );`
 * I hope I’m being helpful rather than annoying! It’s still a great plugin.

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

 *  Plugin Author [skirridsystems](https://wordpress.org/support/users/skirridsystems/)
 * (@skirridsystems)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/php-notice-undefined-offset-10/#post-13709860)
 * Not annoying, this is all helpful comment. I’ll work my way through them 🙂
    
   Thanks, Simon
 *  Plugin Author [skirridsystems](https://wordpress.org/support/users/skirridsystems/)
 * (@skirridsystems)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/php-notice-undefined-offset-10/#post-13725514)
 * I’ve used the slightly clumsier isset check in order to maintain PHP5.x compatibility.

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

The topic ‘PHP Notice: Undefined offset’ is closed to new replies.

 * ![](https://ps.w.org/os-datahub-maps/assets/icon-256x256.jpg?rev=2376803)
 * [OS DataHub Maps](https://wordpress.org/plugins/os-datahub-maps/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/os-datahub-maps/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/os-datahub-maps/)
 * [Active Topics](https://wordpress.org/support/plugin/os-datahub-maps/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/os-datahub-maps/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/os-datahub-maps/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [skirridsystems](https://wordpress.org/support/users/skirridsystems/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/php-notice-undefined-offset-10/#post-13725514)
 * Status: resolved