Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
Use is_object() instead of !is_string() when checking for callables
Browse files Browse the repository at this point in the history
  • Loading branch information
leofeyer committed Mar 25, 2015
1 parent 944bb7f commit 855fe68
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions system/modules/core/library/Contao/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ public function __get($strKey)
{
if (isset($this->arrData[$strKey]))
{
// Disable string callables to avoid calling PHP functions
if (!is_string($this->arrData[$strKey]) && is_callable($this->arrData[$strKey]))
if (is_object($this->arrData[$strKey]) && is_callable($this->arrData[$strKey]))
{
return $this->arrData[$strKey]();
}
Expand Down

0 comments on commit 855fe68

Please sign in to comment.