From b9ac1a1c268dd6590bb8fb283f45326ce3e0c919 Mon Sep 17 00:00:00 2001 From: Chris Faulkner Date: Tue, 10 Jan 2017 16:02:40 +1030 Subject: Fix Undefined variable: object error Change the undefined variable $object to $vars when calling get_object_vars(). This fixes an error when passing an object to a view. --- system/core/Loader.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/core/Loader.php b/system/core/Loader.php index 17ff2362c..acfc739dd 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -1368,7 +1368,7 @@ class CI_Loader { * Prepare variables for _ci_vars, to be later extract()-ed inside views * * Converts objects to associative arrays and filters-out internal - * variable names (i.e. keys prexied with '_ci_'). + * variable names (i.e. keys prefixed with '_ci_'). * * @param mixed $vars * @return array @@ -1378,7 +1378,7 @@ class CI_Loader { if ( ! is_array($vars)) { $vars = is_object($vars) - ? get_object_vars($object) + ? get_object_vars($vars) : array(); } -- cgit v1.2.3-24-g4f1b