Support » Plugin: mobble » PHP71 Compatibility

  • Hi,

    I’ve got some error with php71 (7.1.8).

    Fatal error: Uncaught Error: [] operator not supported for strings in /Users/penyo/Sites/ Stack trace: #0 /Users/penyo/Sites/ mobble_body_class('') #1 /Users/penyo/Sites/ mobble_class() #2 /Users/penyo/Sites/ include('/Users/penyo/Si...') #3 /Users/penyo/Sites/ require_once('/Users/penyo/Si...') #4 /Users/penyo/Sites/ require('/Users/penyo/Si...') #5 {main} thrown in /Users/penyo/Sites/ on line 261


Viewing 3 replies - 1 through 3 (of 3 total)
  • Fixed. Add

    $classes = array();

    at the line:

    	// bonus
    	if ( ! is_handheld() ) {
    		$classes = array();
    		$classes[] = 'desktop';
    Plugin Author Scott (@scottsweb)


    I am not sure about this one. $classes should be an array long before then. It gets passed in here: from the filter. It seems odd setting it later on does the trick. This would also destroy any existing classes.



    Now i’m using with :

    global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_edge, $mobble_detect;
    $classes = array();

    I’m using mobble with html class, not body class.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PHP71 Compatibility’ is closed to new replies.