Remove unreachable code after an exception
authorAmire80 <amir.aharoni@mail.huji.ac.il>
Fri, 21 Oct 2016 20:39:07 +0000 (13:39 -0700)
committerAmire80 <amir.aharoni@mail.huji.ac.il>
Fri, 21 Oct 2016 20:39:07 +0000 (13:39 -0700)
Follow up to
I6b9b29b7017f958d62611671be017f97cee73415

Change-Id: Ib3ccbb103097a50f04b798a4ff33eedc64e62aef

languages/Language.php

index 4628812..ab7220c 100644 (file)
@@ -3780,9 +3780,9 @@ class Language {
                                file_get_contents( $grammarDataFile ),
                                true
                        );
+
                        if ( $data === null ) {
                                throw new MWException( "Invalid grammar data for \"$languageCode\"." );
-                               $data = [];
                        }
 
                        self::$grammarTransformations->set( $languageCode, $data );