From 1d984da04a88f506f0673efa5638d51cde5346ff Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Thu, 9 Jul 2009 21:13:23 +0000 Subject: [PATCH] Make checked and selected compare more carefully and update the phpdoc with the correct @since version. Fixes #9862 props Denis-de-Bernardy. git-svn-id: https://develop.svn.wordpress.org/trunk@11703 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/template.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 9f51a4b6a3..de0dc6586b 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -376,7 +376,7 @@ function link_cat_row( $category, $name_override = false ) { * * Compares the first two arguments and if identical marks as checked * - * @since 2.8 + * @since 1.0 * * @param any $checked One of the values to compare * @param any $current (true) The other value to compare if not just true @@ -391,7 +391,7 @@ function checked( $checked, $current = true, $echo = true) { * * Compares the first two arguments and if identical marks as selected * - * @since 2.8 + * @since 1.0 * * @param any selected One of the values to compare * @param any $current (true) The other value to compare if not just true @@ -415,7 +415,7 @@ function selected( $selected, $current = true, $echo = true) { * @param string $type The type of checked|selected we are doing. */ function __checked_selected_helper( $helper, $current, $echo, $type) { - if ( $helper == $current) + if ( (string) $helper === (string) $current) $result = " $type='$type'"; else $result = '';