• Resolved robertsay

    (@robertsay)


    Hello,

    I use the plugin Events Manager but in the help section on WordPress wp-admin, this error appears.

    Can someone help me ?

    Notice: Undefined index: name in /Users/xxx/Sites/xxxx/xxxx/wp-content/plugins/events-manager/classes/em-object.php on line 1272

    Thank you

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi,
    EM User here too.

    I get that notice too, but only on the Help Page (where all the placeholders are listed) AND if I’m in debug mode. Since the Help page doesn’t really do anything and because it’s a simple notice, you can just ignore it.

    Yet, if you feel you really want to “solve” it, you can put a @ in front of $name on line 1272 in that file. ??

    Thread Starter robertsay

    (@robertsay)

    Like this ?

    It’s not working…

    	function get_fields( $inverted_array=false ){
    		if( is_array($this->fields) ){
    			$return = array();
    			foreach($this->fields as $fieldName => $fieldArray){
    				if($inverted_array){
    					$return[$fieldArray['@name']] = $fieldName;
    				}else{
    					$return[$fieldName] = $fieldArray['@name'];
    				}
    			}
    			return apply_filters('em_object_get_fields', $return, $this, $inverted_array);
    		}
    		return apply_filters('em_object_get_fields', array(), $this, $inverted_array);
    	}

    Sorry Robert, I tried to recreate the error for you, but I cannot…. So I cannot test the “solution”. Except for turning off debug mode, of course ??

    Plugin Support angelo_nwl

    (@angelo_nwl)

    yes, since it’s not a fatal error and everything should work as expected; easiest would be setting wp_debug to false in your wp-config.php

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Error Undefined index: name’ is closed to new replies.