• darrengates

    (@darrengates)


    After updating this theme on February 27th, 2016, I got this error

    Can’t use function return value in write context

    It happens in functions.php, about line 863. It only goes away after I comment out the “catchbox_sliders” function on line 807 of functions.php

Viewing 5 replies - 1 through 5 (of 5 total)
  • datahound2u

    (@datahound2u)

    I had the exact same problem, except after commenting out the “catchbox_sliders” function, I kept getting syntax errors for unexpected end of file. I’d go to the line specified and comment it out or add a ?> tag, but then another line would show up.

    I’m completely hosed at the moment. I may have to go through my FTP client to delete the entire theme folder.

    Did you bother to test this latest update? (Just curious.)

    Thread Starter darrengates

    (@darrengates)

    I’m using the most recent version of Catch-Box – the one released yesterday.

    Thread Starter darrengates

    (@darrengates)

    The precise error is:

    Fatal error: Can’t use function return value in write context in /wp-content/themes/catch-box/functions.php on line 836

    Thread Starter darrengates

    (@darrengates)

    Upon further research, it appears that the problem is in this specific line of functions.php:

    if( ( !$catchbox_sliders = get_transient( 'catchbox_sliders' ) ) &&
    	!empty( array_filter( $options[ 'featured_slider' ] ) )  ) {

    (approximately line 826)

    If this is changed to:

    if( ( !$catchbox_sliders = get_transient( 'catchbox_sliders' ) ) &&
    	false != ( array_filter( $options[ 'featured_slider' ] ) )  ) {

    … then the problem goes away.

    This post from stackoverflow has more information about why using the “empty” function here yields an error:

    https://stackoverflow.com/questions/17139264/cant-use-function-return-value-in-write-context

    Hello,
    Have you tried fresh installing the theme and check if the theme has the same error or not ?
    For swift response please visit the themes official forum

    https://catchthemes.com/support-forum/forum/catch-box-public/

    regards,
    bplv

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Error when updating to latest verion’ is closed to new replies.