diff --git a/app.php b/app.php index b22bbd2406..e80ebd0361 100644 --- a/app.php +++ b/app.php @@ -192,7 +192,7 @@ class AtomParser { $this->in_content = array(); } else { $endtag = $this->ns_to_prefix($name); - if(strstr($this->in_content[count($this->in_content)-1], "<$endtag")) { + if (strpos($this->in_content[count($this->in_content)-1], '<' . $endtag) !== false) array_push($this->in_content, "/>"); } else { array_push($this->in_content, "$endtag>"); @@ -220,7 +220,7 @@ class AtomParser { #print str_repeat(" ", $this->depth * $this->indent) . "data: #" . $data . "#\n"; if(!empty($this->in_content)) { // handle self-closing tags (case: text node found, need to close element started) - if(strstr($this->in_content[count($this->in_content)-1], "<")) { + if (strpos($this->in_content[count($this->in_content)-1], '<') !== false) { array_push($this->in_content, ">"); } array_push($this->in_content, $this->xml_escape($data)); diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php index 8c9fc400c2..2fa0688e6e 100644 --- a/wp-admin/admin-functions.php +++ b/wp-admin/admin-functions.php @@ -1143,7 +1143,7 @@ function insert_with_markers( $filename, $marker, $insertion ) { if ( $markerdata ) { $state = true; foreach ( $markerdata as $n => $markerline ) { - if ( strstr( $markerline, "# BEGIN {$marker}" )) + if (strpos($markerline, '# BEGIN ' . $marker) !== false) $state = false; if ( $state ) { if ( $n + 1 < count( $markerdata ) ) @@ -1151,7 +1151,7 @@ function insert_with_markers( $filename, $marker, $insertion ) { else fwrite( $f, "{$markerline}" ); } - if ( strstr( $markerline, "# END {$marker}" ) ) { + if (strpos($markerline, '# END ' . $marker) !== false) { fwrite( $f, "# BEGIN {$marker}\n" ); if ( is_array( $insertion )) foreach ( $insertion as $insertline ) @@ -1189,11 +1189,11 @@ function extract_from_markers( $filename, $marker ) { { $state = false; foreach ( $markerdata as $markerline ) { - if ( strstr( $markerline, "# END {$marker}" )) + if (strpos($markerline, '# END ' . $marker) !== false) $state = false; if ( $state ) $result[] = $markerline; - if ( strstr( $markerline, "# BEGIN {$marker}" )) + if (strpos($markerline, '# BEGIN ' . $marker) !== false) $state = true; } } @@ -1766,7 +1766,8 @@ function browse_happy() {
'; } -if ( strstr( $_SERVER['HTTP_USER_AGENT'], 'MSIE' )) + +if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) add_action( 'admin_footer', 'browse_happy' ); function documentation_link( $for ) { @@ -1927,11 +1928,11 @@ function wp_import_cleanup( $id ) { function wp_import_upload_form( $action ) { $size = strtolower( ini_get( 'upload_max_filesize' ) ); $bytes = 0; - if ( strstr( $size, 'k' ) ) + if (strpos($size, 'k') !== false) $bytes = $size * 1024; - if ( strstr( $size, 'm' ) ) + if (strpos($size, 'm') !== false) $bytes = $size * 1024 * 1024; - if ( strstr( $size, 'g' ) ) + if (strpos($size, 'g') !== false) $bytes = $size * 1024 * 1024 * 1024; ?>