• Resolved alx359

    (@alx359)


    PHP Fatal error: Cannot redeclare jr_mt_query_chars() (previously declared in \wp-content\plugins\jonradio-multiple-themes\includes\admin-validate.php:268)

    This happens when switching and submitting another theme in the dropdown next to Select Theme for Site Home.

    jr_mt_query_chars() is declared inside jr_mt_validate_settings() which isn’t a good practice in general as the code could become finicky. jr_mt_validate_settings() seems gets called twice somewhere, so the declaration happens twice, hence the fatal error.

    A way to workaround this is by making jr_mt_query_chars() as a variable to an anonymous function:$jr_mt_query_chars = function() {}

    Another thing noticed were many php warnings from input elements that had not been set. For example:
    PHP Warning: Undefined array key "add_path_id" in \includes\admin-validate.php on line 114

    So said code in line 114:
    $url = jr_mt_sanitize_url( $input['add_path_id'] ); .
    It could be tweaked like this instead:
    $url = jr_mt_sanitize_url( $input['add_path_id'] ?? '' );

Viewing 1 replies (of 1 total)
  • Plugin Author David Gewirtz

    (@dgewirtz)

    Support for Multiple Themes has moved to the ZATZLabs site and is no longer provided on the www.remarpro.com forums. If you need a timely reply from the developer, please?open a ticket.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.