WordPress.org

Ready to get started?Download WordPress

Forums

Blogger Importer
[Bug fix] Blogger failed to import with WP v3.2, plugin 0.4 (1 post)

  1. carlc75
    Member
    Posted 3 years ago #

    Can't find a bug tracker, so posting here

    Problem: Blogger importer failed to import, died silently.

    Errors: strpos() expects parameter 1 to be string, array given in /srv/wordpress/jiwordpress/wp-content/plugins/blogger-importer/blogger-importer.php on line 1074

    After getting some debug output, the value in question was an array witht he string needed in index 0.

    Fix: see patch

    === patch

    --- blogger-importer.php 2011-07-05 16:12:37.000000000 +0000
    +++ blogger-importer.php 2011-07-05 17:11:02.000000000 +0000
    @@ -1060,7 +1060,11 @@
    #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 (strpos($this->in_content[count($this->in_content)-1], '<') !== false) {
    + $str = $this->in_content[count($this->in_content)-1];
    + if ( is_array($str) ) {
    + $str = $str[0];
    + }
    + if (strpos($str, '<') !== false) {
    array_push($this->in_content, ">");
    }
    array_push($this->in_content, $this->xml_escape($data));

    http://wordpress.org/extend/plugins/blogger-importer/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic