Commit 3b05e9f2 authored by Kev's avatar Kev 🐾
Browse files

Fix callable string calls global function

This fixes a bug where a value, such as `exec`, is technically callable
but we don’t expect it to be actually callable as it’s likely to be a
value of a model.
parent 9ea98538
Pipeline #625821862 passed with stage
in 52 seconds
......@@ -40,7 +40,7 @@ abstract class Entity implements Arrayable
$value = $this->object->{$name};
}
$value = is_callable($value) ? $value() : $value;
$value = !is_string($value) && is_callable($value) ? $value() : $value;
$this->exposes[$name] = $value;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment