Explorar o código

Update, do not use eval for get_plugin_lang() method - refs BT#9092

Daniel Barreto %!s(int64=10) %!d(string=hai) anos
pai
achega
7825df05a1
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      main/inc/lib/internationalization.lib.php

+ 3 - 3
main/inc/lib/internationalization.lib.php

@@ -3348,12 +3348,12 @@ function get_datepicker_langage_code() {
 
 /**
  * Returns the variable translated
- * @param $variable the string to translate
- * @param $pluginName the Plugin name
+ * @param string $variable the string to translate
+ * @param string $pluginName the Plugin name
  * @return string the variable translated
  */
 function get_plugin_lang($variable, $pluginName) {
-    eval("\$plugin = {$pluginName}::create();");
+    $plugin = $pluginName::create();
     return $plugin->get_lang($variable);
 }
 /**