Support » Plugin: Responsify WP » php errors in wp-include/functions.php? (string given, array given)

  • Resolved the.mnbvcx

    (@themnbvcx-1)


    Hi Stefan,
    after the last update of RWP I noticed a lot of php errors being thrown:

    Warning: realpath() expects parameter 1 to be a valid path, array given in /home/www/4str.in/beta/wp-includes/functions.php on line 1658
    Warning: strlen() expects parameter 1 to be string, array given in /home/www/4str.in/beta/wp-includes/functions.php on line 1661
    Warning: ltrim() expects parameter 1 to be string, array given in /home/www/4str.in/beta/wp-includes/functions.php on line 1688
    Warning: realpath() expects parameter 1 to be a valid path, array given in /home/www/4str.in/beta/wp-includes/functions.php on line 1658
    Warning: strlen() expects parameter 1 to be string, array given in /home/www/4str.in/beta/wp-includes/functions.php on line 1661
    Warning: ltrim() expects parameter 1 to be string, array given in /home/www/4str.in/beta/wp-includes/functions.php on line 1688

    These errors occur with content and thumbnails as well as when using rwp_style in my child function.php; at least rwp_style still generates the correct code after throwing the error messages.

    Code in functions.php:

    $style = rwp_style($responsive_image_id, array(
    	'selector' => '#section',
    	'sizes' => array('blog-thumbnail', 'bg720', 'bg1024', 'bg1280', 'bg1440', 'bg1680', 'full'),
    	'media_queries' => array(
    		'bg720'  => 'min-width:  720px',
    		'bg1024' => 'min-width: 1024px',
    		'bg1280' => 'min-width: 1280px',
    		'bg1440' => 'min-width: 1440px',
    		'bg1680' => 'min-width: 1680px',
    		'full'   => 'min-width: 1920px',
    	) ) );
    $child_css .= substr( $style, 7, -8); //eliminate the style tags
    

    I am a bit lost in finding the root cause now, for the time being the only fix seems to be switching off RWP completely – which is kind of contraproductive….

    • This topic was modified 3 years, 3 months ago by the.mnbvcx.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author stefanledin

    (@stefanledin)

    Hi! So these errors disappear with RWP disabled? And this is happening after updating from 1.9.7 to 1.9.8?

    Thread Starter the.mnbvcx

    (@themnbvcx-1)

    Yes, the errors disappear with RWP deactivated.
    On pages they disappear when the filters content and thumbnails are disabled, manual call of rwp_style still gives errors and generates correct css.

    But I just downgraded to 1.9.7 and had exactly the same behaviour; seems it happens for a while longer – or the root cause is something completely different.

    Plugin Author stefanledin

    (@stefanledin)

    That’s strange. None of the error messages is directly tied to RWP either. They refer to core WP files. They come from the path_is_absolute() and path_join() functions.
    What environment do you have on the server?

    Thread Starter the.mnbvcx

    (@themnbvcx-1)

    It’s a standard shared hosting platform w/ php 7.1.9, Apache 2 – nothing special.

    But I think I will rest my case here (at least for a while) and simply reinstall the site; it was only a test version anyway so it doesn’t hurt too much.

    And I will report back my findings.

    Plugin Author stefanledin

    (@stefanledin)

    Okey! Keep me posted. This is kinda interesting (but frustrating!)

    Thread Starter the.mnbvcx

    (@themnbvcx-1)

    I gave up further investigations after I discovered that everything was fine on the production site from which I had cloned the test site (on the very same server). The errors could not be reproduced by any means, I now simply accept the plugin working fine as all the years before 😉

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘php errors in wp-include/functions.php? (string given, array given)’ is closed to new replies.