From 41caff3582bf083dcb04be3d320d454b20ce1a7e Mon Sep 17 00:00:00 2001 From: Nathan Kowald Date: Mon, 29 Jan 2018 09:49:31 +1030 Subject: [PATCH 1/2] Fix fatal error "Uncaught Error: [] operator not supported for strings in..." using the plugin with PHP 7.1.8 --- html-importer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/html-importer.php b/html-importer.php index 7778872..dab8de5 100644 --- a/html-importer.php +++ b/html-importer.php @@ -1111,7 +1111,7 @@ function import() { if ( validate_import_file( $options['root_directory'] ) > 0 ) wp_die( __( "The beginning directory you entered is not an absolute path. Relative paths are not allowed here.", 'import-html-pages' ) ); - $this->table = ''; + $this->table = array(); $this->redirects = ''; $this->filearr = array(); $skipdirs = explode( ",", $options['skipdirs'] ); @@ -1198,4 +1198,4 @@ function mb_strlen( $string ) { function mb_strrpos( $haystack, $needle, $offset = 0 ) { return strrpos( utf8_decode( $haystack ), $needle, $offset ); } -} \ No newline at end of file +} From fc99b380a70f73da322035c0a194e70ec73102de Mon Sep 17 00:00:00 2001 From: Nathan Kowald Date: Mon, 29 Jan 2018 09:53:58 +1030 Subject: [PATCH 2/2] Remove line ending --- html-importer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html-importer.php b/html-importer.php index dab8de5..adb8689 100644 --- a/html-importer.php +++ b/html-importer.php @@ -1198,4 +1198,4 @@ function mb_strlen( $string ) { function mb_strrpos( $haystack, $needle, $offset = 0 ) { return strrpos( utf8_decode( $haystack ), $needle, $offset ); } -} +} \ No newline at end of file