foreach ( $from as $lc => $uc ) {
$ref = $to[$lc] ?? null;
if ( $ref !== null && $ref !== $uc ) {
- $overrides[$lc] = $uc;
+ $overrides[$lc] = $ref;
}
}
$writer = new StaticArrayWriter();
$msg = sprintf( "Could not load data from file '%s'\n", $filename );
$this->fatalError( $msg );
}
- $json = json_decode( $data );
- if ( $result === null ) {
+ $json = json_decode( $data, true );
+ if ( $json === null ) {
$msg = sprintf( "Invalid json in the data file %s\n", $filename );
$this->fatalError( $msg, 2 );
}