• Resolved Rhapsody348

    (@rhapsody348)


    David,

    I found a small bug that crashes the MLA Multisite Extension V1.1.3 when it is called upon creating a new site. After the crash, the routine when called again works fine. I have located the cause and tested a fix that works. In the file mla-multisite-extensions.php there is a private static function _get_source_site_terms( $source_taxonomies ). On line 453 is the statement:

    ksort( self::$source_terms[ $tax_name ] );

    This crashes when $source_terms is empty. The following tests for an empty variable and prevents executing the ksort to fix the problem.

    if (!empty($source_terms)) ksort( self::$source_terms[ $tax_name ] );
    • This topic was modified 1 year, 3 months ago by Rhapsody348.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for your report and for the time you took to find and fix the problem. I will verify and incorporate your fix in my next update.

    Plugin Author David Lingren

    (@dglingren)

    I have just updated the example plugin. My fix is a bit different, but should work in the same way:

    // Sort by term id within each taxonomy
    if ( !empty( $terms ) ) {
    	ksort( self::$source_terms[ $tax_name ] );
    }
    

    Thanks again for alerting me to this defect.

    Plugin Author David Lingren

    (@dglingren)

    I have released MLA version 3.11, which contains the fixes required for this topic.

    I am marking this topic resolved, but please update it if you have any problems or further questions regarding the MLA Multisite Extensions example plugin. Thanks for alerting me to this MLA defect.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘MLA Multisite Extension New Site Creation – Bug Fix’ is closed to new replies.