mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-02 17:34:26 +02:00
Improve issue with certain ?? ternary in 159ed4ee02
for smarty class magic __get() method.
This commit is contained in:
@@ -66,7 +66,7 @@ class Smarty_Internal_Extension_Handler
|
||||
public function _callExternalMethod(Smarty_Internal_Data $data, $name, $args)
|
||||
{
|
||||
/* @var Smarty $data ->smarty */
|
||||
$smarty = $data->smarty ?? $data;
|
||||
$smarty = isset($data->smarty) ? $data->smarty : $data; // don't use ?? for isset here since that would need a follow-up property define in Smarty class for __get()
|
||||
if (!isset($smarty->ext->$name)) {
|
||||
if (preg_match('/^((set|get)|(.*?))([A-Z].*)$/', $name, $match)) {
|
||||
$basename = $this->upperCase($match[ 4 ]);
|
||||
|
Reference in New Issue
Block a user