CoursePress Pro Illegal string offset 'instructors'

Hello.

I am trying to add a new course (first course, actually), but unable to expand the 'instructors' section. Instead I see this message:

"Illegal string offset 'instructors' in /home/loganr22/public_html/client/trinityonlinegroups/wp-content/plugins/coursepress/2.0/include/coursepress/helper/class-utility.php on line
Warning: Illegal string offset 'instructors' in on line 149"

Support access is granted.

Thank you!

  • Logan
    • The Incredible Code Injector

    For posterity, the line of code in question is "$a[ $key ? $key : count( $a ) ] = $value;" in the code below. Please help! Thanks!

    // set array value based on path.
    	public static function set_array_val( &$a, $path, $value ) {
    		if ( ! is_array( $path ) ) {
    			$path = explode( '/', $path );
    		}
    
    		$key = array_pop( $path );
    		foreach ( $path as $k ) {
    			if ( ! isset( $a[ $k ] ) || ! is_array( $a[ $k ] ) ) {
    				$a[ $k ] = array();
    			}
    			$a = &$a[ $k ];
    		}
    		$a[ $key ? $key : count( $a ) ] = $value;
    	}
  • Logan
    • The Incredible Code Injector

    UPDATE. Found an post (Elegant Themes support; though imagine there is one here, as well) that replaced:

    define('WP_DEBUG_DISPLAY', false)

    with this:

    ini_set('log_errors','On');
    ini_set('display_errors','Off');
    ini_set('error_reporting', E_ALL );
    define('WP_DEBUG', false);
    define('WP_DEBUG_LOG', true);
    define('WP_DEBUG_DISPLAY', false);

    G2G

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.