• Resolved darcysutopia

    (@darcysutopia)


    Hello,
    Keep seeing an error appear in our logs (hundreds of times a day):

    Invalid argument supplied for foreach()
    in wp-content/plugins/staff-directory-pro/gold-framework/staff-directory-plugin.settings.page.class.php (1172)

    Any idea on how we can fix it or is it something you guys will have to look at

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author richardgabriel

    (@richardgabriel)

    Hey @darcysutopia!

    That sounds like a notice from an unset variable. I believe we have patched this issue already, can you confirm the version of the software you are on?

    If you are on the most recent version, I should be able to supply you with instructions to fix immediately while you wait on a patch, if you would like. A notice won’t cause things to stop working (it will fill your logs up in the meantime, however.)

    All the best,
    Richard

    Thread Starter darcysutopia

    (@darcysutopia)

    Hello @richardgabriel

    We are on version 1.14

    Not causing an issue, but as you said filling up our logs which over time just slows down some other things for us.

    Happy to wait until the next version to cause less work for you now providing instructions.

    I think this issue still exists:

    PHP Warning: Invalid argument supplied for foreach() in ...\wp-content\plugins\staff-directory-pro\gold-framework\staff-directory-plugin.settings.page.class.php on line 930

    The line number has changed since version changes, but you can tell that it is still the end of the file. To be specific:

    
    	function add_extra_classes_to_admin_menu() 										
    	{										
    		global $menu;									
    		foreach( $menu as $key => $value ) {			<-- HERE						
    			$extra_classes = 'company_directory_admin_menu';								
    			$extra_classes .= $this->root->is_pro()								
    							  ? ' company_directory_pro_admin_menu'				
    							  : ' company_directory_free_admin_menu';				
    			if( 'Company Directory Settings' == $value[0] ) {								
    				$menu[$key][4] .= ' ' . $extra_classes;							
    			}								
    		}									
    	}										
    

    Wanted to see if this problem was re-addressed as it is not resolved. With multiple entries dozens an hour, it clusters the log for any real problems. Thank you!

    Plugin Author richardgabriel

    (@richardgabriel)

    Hey @krmarshall87

    Thanks for following up on this.

    I have escalated this to be addressed ASAP so that we aren’t cluttering your logs with notices.

    Best,
    Richard

    Plugin Author richardgabriel

    (@richardgabriel)

    Hey @krmarshall87

    I wanted to follow up that this has been patched in version 3.0.1 of the plugin. I’ve confirmed it in a few other places but if you wouldn’t mind double-checking that the update fixes your issue as well we would appreciate it!

    All the best,
    Richard

    Thanks @richardgabriel! It looks like that has probably done the trick! No errors since the upgrade. Really appreciate this!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Error in logs’ is closed to new replies.