PluginProbe
VikBooking Hotel Booking Engine & PMS / 1.8.16
VikBooking Hotel Booking Engine & PMS v1.8.16
1.8.16 1.8.15 1.8.14 1.8.13 1.8.12 1.8.11 1.8.10 1.8.9 1.8.6 1.8.7 1.8.8 trunk 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.7.2 All 37 releases
← All changes | libraries/adapter/language/language.php +5 -3 1.8.6 → 1.8.16 View file →
@@ -69,14 +69,16 @@
69 69 * @return self The Language object.
70 70 */
71 71 public static function getInstance($lang = null)
72 72 {
73 - if (!isset(static::$instances[$lang]))
73 + $key = (string) $lang;
74 +
75 + if (!isset(static::$instances[$key]))
74 76 {
75 - static::$instances[$lang] = new static($lang);
77 + static::$instances[$key] = new static($lang);
76 78 }
77 79
78 - return static::$instances[$lang];
80 + return static::$instances[$key];
79 81 }
80 82
81 83 /**
82 84 * Loads a single language file. This method doesn't update the