Smarty: template property 'security' does not exist.

In diesem Board könnt Ihr alle "allgemeinen" Fragen zum Thema MyOOS stellen.
r23
Beiträge: 1594
Registriert: 18.09.2008, 05:56
Wohnort: Hagen
Kontaktdaten:

Smarty: template property 'security' does not exist.

Beitragvon r23 » 03.01.2016, 07:16

Hallo,

bei einem Update von Smaryt Version 2 auf 3 sind leider auch Änderungen an den Plugins notwendig.

Die Fehlermeldung:
PHP Fatal error: Uncaught --> Smarty: template property 'security' does not exist. <--
thrown in ... smarty/libs/sysplugins/smarty_internal_template.php on line 364
hier zum Beispiel ein imge Plugin


aus

Code: Alles auswählen

    if (substr($file,0,1) == '/') {         $_image_path = $basedir . $file;     } else {         $_image_path = $file;     }     if(!isset($params['width']) || !isset($params['height'])) {         if ($smarty->security &&             ($_params = array('resource_type' => 'file', 'resource_name' => $_image_path)) &&             (require_once(SMARTY_CORE_DIR . 'core.is_secure.php')) &&             (!smarty_core_is_secure($_params, $smarty)) ) {             $smarty->trigger_error("html_image: (secure) '$_image_path' not in secure directory", E_USER_NOTICE);         } elseif (!$_image_data = @getimagesize($_image_path)) {             if(!file_exists($_image_path)) {                 $smarty->trigger_error("html_image: unable to find '$_image_path'", E_USER_NOTICE);                 return;             } else if(!is_readable($_image_path)) {                 $smarty->trigger_error("html_image: unable to read '$_image_path'", E_USER_NOTICE);                 return;             } else {                 $smarty->trigger_error("html_image: '$_image_path' is not a valid image file", E_USER_NOTICE);                 return;             }         }         if(!isset($params['width'])) {             $width = $_image_data[0];         }         if(!isset($params['height'])) {             $height = $_image_data[1];         }     }   
wird

Code: Alles auswählen

    if (isset($template->smarty->security_policy)) {             // local file             if (!$template->smarty->security_policy->isTrustedResourceDir($_image_path)) {                 return;             }     }     if (!isset($params['width']) || !isset($params['height'])) {         // FIXME: (rodneyrehm) getimagesize() loads the complete file off a remote resource, use custom [jpg,png,gif]header reader!         if (!$_image_data = @getimagesize($_image_path)) {             if (!file_exists($_image_path)) {                 trigger_error("html_image: unable to find '$_image_path'", E_USER_NOTICE);                 return;             } elseif (!is_readable($_image_path)) {                 trigger_error("html_image: unable to read '$_image_path'", E_USER_NOTICE);                 return;             } else {                 trigger_error("html_image: '$_image_path' is not a valid image file", E_USER_NOTICE);                 return;             }         }         if (!isset($params['width'])) {             $width = $_image_data[0];         }         if (!isset($params['height'])) {             $height = $_image_data[1];         }     }        
Ich hoffe, der Hinweis hilft euch weiter

Beste Grüße

Ralf

Zurück zu „MyOOS: Allgemeines“

Wer ist online?

Mitglieder in diesem Forum: MSN [Bot] und 2 Gäste