View difference between Paste ID: T5dsyNPw and nSSvuAKG
SHOW: | | - or go back to the newest paste.
1
# Node.php (model)
2
3
(...)
4
5
public function find()
6
{
7
	parent::find();
8
9-
	// `get_fields()` loads associated fields.
9+
	if ($this->loaded())
10-
	$this->custom_fields = $this->get_fields();
10+
	{
11
		// `get_fields()` loads associated fields.
12
		$this->custom_fields = $this->get_fields();
13
	}
14
15
	return $this;
16
}