[Plugin: Blogger Importer] [Bug fix] Blogger failed to import with WP v3.2, plugin 0.4
-
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));
- The topic ‘[Plugin: Blogger Importer] [Bug fix] Blogger failed to import with WP v3.2, plugin 0.4’ is closed to new replies.