From 9cef023a966bcb7621dbaae497a71ba5c80c5dfa Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Thu, 25 Jun 2015 16:48:14 +0000 Subject: [PATCH] `prep_atom_text_construct()` and `before_last_bar()` should strictly check against `false` when using `str(r)?pos()`. Sidenote: there's a function named `before_last_bar`. See #32444. git-svn-id: https://develop.svn.wordpress.org/trunk@32940 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/feed.php | 2 +- src/wp-includes/l10n.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/feed.php b/src/wp-includes/feed.php index 01e2c2427a..4554d0e461 100644 --- a/src/wp-includes/feed.php +++ b/src/wp-includes/feed.php @@ -580,7 +580,7 @@ function prep_atom_text_construct($data) { } } - if (strpos($data, ']]>') == false) { + if (strpos($data, ']]>') === false) { return array('html', ""); } else { return array('html', htmlspecialchars($data)); diff --git a/src/wp-includes/l10n.php b/src/wp-includes/l10n.php index c2d2713bbf..033310a88d 100644 --- a/src/wp-includes/l10n.php +++ b/src/wp-includes/l10n.php @@ -116,7 +116,7 @@ function translate( $text, $domain = 'default' ) { */ function before_last_bar( $string ) { $last_bar = strrpos( $string, '|' ); - if ( false == $last_bar ) + if ( false === $last_bar ) return $string; else return substr( $string, 0, $last_bar );