fuel / oil

Fuel PHP Framework - Fuel v1.x Oil command-line package
http://fuelphp.com/docs/packages/oil/intro.html
106 stars 67 forks source link

Validation Class Crashes Console #46

Closed knudpotente closed 12 years ago

knudpotente commented 13 years ago

Issue reported in the Forum (http://fuelphp.com/forums/topics/view/5199).

It seems that Validation objects can be instantiated in the console, but not used - from the command line:

> oil console
Fuel 1.0.1 - PHP 5.3.6 (cli) (Jun 16 2011 22:23:58) [Darwin]

>>> $val = Validation::factory()
>>> $val->add_field('username', 'Your username', 'required')
PHP Fatal error: Nesting level too deep - recursive dependency? in /Users/[...]/fuel/packages/oil/classes/console.php on line 111
Error - Nesting level too deep - recursive dependency? in PKGPATH/oil/classes/console.php on line 111

Creating $val is possible, but trying to add fields or rules (and test validation) seems to cause a crashing recursion error.

philsturgeon commented 12 years ago

This is not really something that Oil can do anything about, those methods just return a shitload of recursive code. Got any ideas @jschreuder?

jschreuder commented 12 years ago

Validation::add_field() will call Fieldset_Field::add_rule() for adding the rule, but that's about as deep as it gets. No recursive calls in there as far as I know.

WanWizard commented 12 years ago

@knudpotente: is this still relevant?

WanWizard commented 12 years ago

Closed due to no response.