Articles of warnings

What is causing this error? “Warning: Invalid argument”

I need urgent help figuring this out please – I’ve been working on a WordPress theme locally without problems, and now that I’ve uploaded it to the live server I’m getting this error: Warning: Invalid argument supplied for foreach() in /homepages/42/d357924500/htdocs/wp-includes/post.php on line 1011 The corresponding code is related to the register_post_type function: foreach ( […]

Stackoverflow type of badge plugin giving warnings in WordPress 3.5

I modified an abandoned Stackoverflow form of badge plugin to work with WordPress 3.4.2 and it does indeed. The full script for it is here: When upgrading to WordPress v3.5, I receive these warnings when publishing a post (or post a comment): Warning: Missing argument 2 for wpdb::prepare(), called in /public_html/wp-content/plugins/rockhoist-badges/rh-badges.php on line 342 […]

Undefined property: WP_Query::$post

I am working on some rather elaborate comparisons between metadata and having a bit of trouble correctly referring to results from my query. The first query to establish $team_is_home works fine but as soon as I try to capture the ID of the posts where the $team_is_homeit goes a bit haywire and I get warnings […]

Warning: array_pop() expects parameter 1 to be array, boolean given

Getting the following php error when trying to add a new post: Warning: array_pop() expects parameter 1 to be array, boolean given in /home/mysite/public_html/blog/wp-content/themes/mytheme/functions.php on line 675 Here is the function: function glossary_term_permalink($post_link, $post, $leavename, $sample) { if (false !== strpos($post_link, ‘%recipe_cat%’)) { $glossary_letter = get_the_terms($post->ID, ‘recipe_cat’); $post_link = str_replace(‘%recipe_cat%’, array_pop($glossary_letter)->slug, $post_link); } return $post_link; […]

PHP contact form returns warning in text widget

I have created a contact form (with a lot of help from you guys here) and I want to be able to use it on pages and in text widgets via a shortcode (for sidebars etc). It works perfectly on both with the exception of when the form is submitted, I get Illegal string offset […]

Getting Warnings & Notices from Fresh WordPress 3.1.2 install

I just installed WordPress 3.1.2, I got `Notice: automatic_feed_links is deprecated since version 3.0! Use add_theme_support( ‘automatic-feed-links’ ) instead. in /works/web/elements/wp-includes/functions.php on line 3303 I also got an error about Cannot open stream or something about wp-cron.php?doing-cron or something Its WordPress’s own code, plus from a fresh install, this should not happen right? UPDATE The […]

Warning: urlencode() expects parameter 1 to be string, array given

I have posted a question on StackOverflow (sorry for the cross link) and while I’m striving to find a solution to this, I stumbled across this warning : Warning: urlencode() expects parameter 1 to be string, array given in /var/www/…/httpdocs/wp-includes/formatting.php on line 3192 And doing a backtrace, I find it originates in query.php : wp_includes/query.php, […]

WP_DEBUG is not set, but I'm still getting warnings

If WP_DEBUG is not set, as I understand it, you should never ever see warnings. But on some sites on some servers, I’m still seeing a few. Not all the warnings that would be displayed if WP_DEBUG was set, but a select few. I’ve tried changing the error level in php.ini, but that seems to […]

PHP Warning on fresh install (Connection timed out)

I get this PHP Warning when accessing my fresh WordPress 3.4.1 install (Norwegian language). Warning: fopen(URL_TO_MY_WORDPRESS_PAGE/wp-cron.php?doing_wp_cron=1341476616.7605190277099609375000): failed to open stream: Connection timed out in PATH_TO_MY_WP_FILES/wp-includes/class-http.php on line 923 This is of course with the WP_DEBUG flag set to true, as it’s running on a development server. This happens intermittently, so it seems to be a […]