• I’m getting the error:
    Warning: in_array() [function.in-array]: Wrong datatype for second argument in /homepages/33/d236206946/htdocs/fbcwaynesboro.org/www/wp/wp-includes/rewrite.php on line 59
    on my page
    Looking at the referenced code, I can’t quite figure out how to modify it to remove the warning:
    lines 57-61 in rewrite.php

    function add_feed($feedname, $function) {
    	global $wp_rewrite;
    	if (!in_array($feedname, $wp_rewrite->feeds)) { //override the file if it is
    		$wp_rewrite->feeds[] = $feedname;
    	}

Viewing 1 replies (of 1 total)
  • Your add_feed function is probably occurring too early in the page construction process. I originally had my add_feed hooked into plugins_loaded, where I received this error, but when I changed it to the init hook, I no longer received this error.

Viewing 1 replies (of 1 total)
  • The topic ‘Issue with rewrite.php’ is closed to new replies.