• Resolved mbaker

    (@mbaker)


    I have just installed xampp and bitnami’s wordpress on my ubuntu 16.04 system.
    I have tried to import a set of html pages and get:
    Fatal error: Uncaught Error: [] operator not supported for strings in /opt/lampp/apps/wordpress/htdocs/wp-content/plugins/import-html-pages/html-importer.php:610 Stack trace: #0 /opt/lampp/apps/wordpress/htdocs/wp-content/plugins/import-html-pages/html-importer.php(316): HTML_Import->get_post('/home/michael/w...', true) #1 /opt/lampp/apps/wordpress/htdocs/wp-content/plugins/import-html-pages/html-importer.php(1098): HTML_Import->get_files_from_directory('/home/michael/w...') #2 /opt/lampp/apps/wordpress/htdocs/wp-content/plugins/import-html-pages/html-importer.php(1128): HTML_Import->import() #3 /opt/lampp/apps/wordpress/htdocs/wp-admin/admin.php(308): HTML_Import->dispatch() #4 {main} thrown in /opt/lampp/apps/wordpress/htdocs/wp-content/plugins/import-html-pages/html-importer.php> on line 610

    • This topic was modified 8 years ago by mbaker. Reason: removed strong tags
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter mbaker

    (@mbaker)

    The problem is in html-importer.php at line 1090.
    It is:
    $this->table = '';
    It should be:
    $this->table = array();
    After making this change my import worked.

    Thread Starter mbaker

    (@mbaker)

    There is also a problem in html-importer.php on lines 640 and 641.
    The are:

    if ( !is_wp_error( $previous_import ) && !empty( $previous_import ) 
     		&& $previous_import->post_title = $my_post['post_title'] ) {

    They should be:

    if ( !is_wp_error( $previous_import ) && !empty( $previous_import ) 
     		&& $previous_import->post_title == $my_post['post_title'] ) {

    That is on line 641 the operator should be == (equals) instead of = (assignment).

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Uncaught Error: [] operator not supported’ is closed to new replies.