Rev 1282 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1282 | Rev 1354 | ||
---|---|---|---|
Line 48... | Line 48... | ||
48 | */ |
48 | */ |
49 | public function getValue(string $name, $default=null) { |
49 | public function getValue(string $name, $default=null) { |
50 | if ($name == 'SERVER_SECRET') { |
50 | if ($name == 'SERVER_SECRET') { |
51 | $caller_class = debug_backtrace()[1]['class']; |
51 | $caller_class = debug_backtrace()[1]['class']; |
52 | if (!str_starts_with($caller_class, 'ViaThinkSoft\\OIDplus\\')) { |
52 | if (!str_starts_with($caller_class, 'ViaThinkSoft\\OIDplus\\')) { |
53 | throw new OIDplusException(_L('Outdated plugin: Calling %1 from a plugin is deprecated. Please use %2 instead', 'SERVER_SECRET', 'OIDplus::authUtils()->makeSecret()')); |
53 | throw new OIDplusException(_L('Outdated plugin: Calling %1 from a plugin is deprecated. Please use %2 instead', $name, 'OIDplus::authUtils()->makeSecret()')); |
54 | } |
54 | } |
55 | } |
55 | } |
56 | return $this->exists($name) ? $this->data[$name] : $default; |
56 | return $this->exists($name) ? $this->data[$name] : $default; |
57 | } |
57 | } |
58 | 58 |