Title: php errors in wp-include/functions.php? (string given, array given)
Last modified: November 12, 2017

---

# php errors in wp-include/functions.php? (string given, array given)

 *  Resolved [the.mnbvcx](https://wordpress.org/support/users/themnbvcx-1/)
 * (@themnbvcx-1)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/php-errors-in-wp-include-functions-php-string-given-array-given/)
 * 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 8 years, 6 months ago by [the.mnbvcx](https://wordpress.org/support/users/themnbvcx-1/).

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [stefanledin](https://wordpress.org/support/users/stefanledin/)
 * (@stefanledin)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/php-errors-in-wp-include-functions-php-string-given-array-given/#post-9675694)
 * 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](https://wordpress.org/support/users/themnbvcx-1/)
 * (@themnbvcx-1)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/php-errors-in-wp-include-functions-php-string-given-array-given/#post-9675808)
 * 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](https://wordpress.org/support/users/stefanledin/)
 * (@stefanledin)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/php-errors-in-wp-include-functions-php-string-given-array-given/#post-9676658)
 * 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](https://wordpress.org/support/users/themnbvcx-1/)
 * (@themnbvcx-1)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/php-errors-in-wp-include-functions-php-string-given-array-given/#post-9676874)
 * 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](https://wordpress.org/support/users/stefanledin/)
 * (@stefanledin)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/php-errors-in-wp-include-functions-php-string-given-array-given/#post-9687976)
 * Okey! Keep me posted. This is kinda interesting (but frustrating!)
 *  Thread Starter [the.mnbvcx](https://wordpress.org/support/users/themnbvcx-1/)
 * (@themnbvcx-1)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/php-errors-in-wp-include-functions-php-string-given-array-given/#post-9701690)
 * 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.

 * ![](https://ps.w.org/responsify-wp/assets/icon-256x256.png?rev=1209208)
 * [Responsify WP](https://wordpress.org/plugins/responsify-wp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/responsify-wp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/responsify-wp/)
 * [Active Topics](https://wordpress.org/support/plugin/responsify-wp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/responsify-wp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/responsify-wp/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [the.mnbvcx](https://wordpress.org/support/users/themnbvcx-1/)
 * Last activity: [8 years, 6 months ago](https://wordpress.org/support/topic/php-errors-in-wp-include-functions-php-string-given-array-given/#post-9701690)
 * Status: resolved