From d4007dfa64f2bdc12d111fd0c6f63dd2d0815d24 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Fri, 16 Mar 2007 22:00:43 +0000 Subject: [PATCH] Don't cast to string if empty. Props donncha. fixes #3979 git-svn-id: https://develop.svn.wordpress.org/trunk@5051 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/classes.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/classes.php b/wp-includes/classes.php index 5bdeebe8ec..6bdfb2eff2 100644 --- a/wp-includes/classes.php +++ b/wp-includes/classes.php @@ -149,7 +149,8 @@ class WP { elseif (!empty($perma_query_vars[$wpvar])) $this->query_vars[$wpvar] = $perma_query_vars[$wpvar]; - $this->query_vars[$wpvar] = (string) $this->query_vars[$wpvar]; + if ( !empty( $this->query_vars[$wpvar] ) ) + $this->query_vars[$wpvar] = (string) $this->query_vars[$wpvar]; } foreach ($this->private_query_vars as $var) {