WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/07/2007 05:29:15 AM (14 years ago)
Author:
markjaquith
Message:

Use strpos instead of strstr where ever possible, for speed. Props rob1n. fixes #3920

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/import/blogger.php

    r4953 r4990  
    942942            } else {
    943943                $endtag = $this->ns_to_prefix($name);
    944                 if(strstr($this->in_content[count($this->in_content)-1], "<$endtag")) {
     944                if (strpos($this->in_content[count($this->in_content)-1], '<' . $endtag) !== false) {
    945945                    array_push($this->in_content, "/>");
    946946                } else {
     
    970970        if(!empty($this->in_content)) {
    971971            // handle self-closing tags (case: text node found, need to close element started)
    972             if(strstr($this->in_content[count($this->in_content)-1], "<")) {
     972            if (strpos($this->in_content[count($this->in_content)-1], '<') !== false) {
    973973                array_push($this->in_content, ">");
    974974            }
Note: See TracChangeset for help on using the changeset viewer.