• Resolved Melody

    (@itoneman)


    Hi,
    I have installed the plugin optiontree on php 7 and i have problem about PHP Notice: Only variables should be passed by reference in ot-loader.php on line 326
    In my opinion, next update should replace

    $path = ltrim( end( @explode( get_stylesheet(), str_replace( ‘\\’, ‘/’, dirname( __FILE__ ) ) ) ), ‘/’ );
    .
    .
    to
    .
    .
    $path_base = explode( get_stylesheet(), str_replace( ‘\\’, ‘/’, dirname( __FILE__ ) ) );
    $path = ltrim( end( $path_base ), ‘/’ );

    https://wordpress.org/plugins/option-tree/

Viewing 1 replies (of 1 total)
  • It is said to be updated in next release.

    Workaround which worked for me:
    $path_base = explode( get_template(), str_replace( '\\', '/', dirname( __FILE__ ) ) );
    $path = ltrim( end( $path_base ), '/' );
    instead of both lines 326 and 98.

Viewing 1 replies (of 1 total)
  • The topic ‘Proplem about PHP Notice: Only variables should be passed by reference’ is closed to new replies.