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
This commit is contained in:
parent
f335ef9a66
commit
9cef023a96
@ -580,7 +580,7 @@ function prep_atom_text_construct($data) {
|
||||
}
|
||||
}
|
||||
|
||||
if (strpos($data, ']]>') == false) {
|
||||
if (strpos($data, ']]>') === false) {
|
||||
return array('html', "<![CDATA[$data]]>");
|
||||
} else {
|
||||
return array('html', htmlspecialchars($data));
|
||||
|
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user