Title: Avoid Notice when in Debug mode
Last modified: August 22, 2016

---

# Avoid Notice when in Debug mode

 *  [alomalbarez](https://wordpress.org/support/users/alomalbarez/)
 * (@alomalbarez)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/avoid-notice-when-in-debug-mode/)
 * When using any or all of these :
    define(‘WP_DEBUG’, true); error_reporting(E_ALL);
   ini_set(‘display_errors’, 1);
 * You get a lot of Notices:
 * A PHP Error was encountered
    Severity: Notice Message: Undefined offset: xxx 
   Filename: nextgen-gallery-custom-fields/ngg-custom-fields.php Line Number: 300
 * quick fix
    on line 300 replace if(!$nggcf_values[$pid]) {
 * with:
    if(!isset($nggcf_values[$pid])||(isset($nggcf_values[$pid])&&!$nggcf_values[
   $pid])) {
 * [https://wordpress.org/plugins/nextgen-gallery-custom-fields/](https://wordpress.org/plugins/nextgen-gallery-custom-fields/)

The topic ‘Avoid Notice when in Debug mode’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/nextgen-gallery-custom-fields.svg)
 * [NextGEN Custom Fields](https://wordpress.org/plugins/nextgen-gallery-custom-fields/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextgen-gallery-custom-fields/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextgen-gallery-custom-fields/)
 * [Active Topics](https://wordpress.org/support/plugin/nextgen-gallery-custom-fields/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextgen-gallery-custom-fields/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextgen-gallery-custom-fields/reviews/)

## Tags

 * [notice](https://wordpress.org/support/topic-tag/notice/)
 * [undefined offset](https://wordpress.org/support/topic-tag/undefined-offset/)

 * 0 replies
 * 1 participant
 * Last reply from: [alomalbarez](https://wordpress.org/support/users/alomalbarez/)
 * Last activity: [11 years, 7 months ago](https://wordpress.org/support/topic/avoid-notice-when-in-debug-mode/)
 * Status: not resolved