[eluser]ericrjones1[/eluser]
@wiredesignz: Being the smug developer that I am, I followed your solution provided with one exception. I used the following:
Code:
$this->form_validation->CI = $this;
Based upon my PHP version information, I would have assumed that $this would be passed by reference since $this is referring to my controller ( an object - in PHP 5 all objects are passed by reference automatically, right? ).
Code:
$ php -v
PHP 5.3.8 (cli) (built: Sep 28 2011 17:34:36)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
with Xdebug v2.1.2, Copyright (c) 2002-2011, by Derick Rethans
However, when using the form_validation_helper function validation_errors the conditional statement on line 1054 says that the $CI->form_validation object isn't set even though the $CI->load->is_loaded('form_validation') returns 'form_validation';
Dumping the $CI object, I can see the following loaded classes, but no form_validation object.
Code:
protected '_ci_classes' => &
array
'session' => string 'session' (length=7)
'encrypt' => string 'encrypt' (length=7)
'form_validation' => string 'form_validation' (length=15)
So the gist is:
Code:
// Doesn't work ( mine )
$this->form_validation->CI = $this;
// Works ( yours )
$this->form_validation->CI =& $this;
I feel like I am totally missing something. If you can, will you please explain to me why my code doesn't work.
Thanks for all your help.