Skip to content

Call_user_func Issue #393

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ryangurn opened this issue Jan 20, 2014 · 0 comments
Closed

Call_user_func Issue #393

ryangurn opened this issue Jan 20, 2014 · 0 comments
Assignees

Comments

@ryangurn
Copy link

Im trying to call a create method of a model dynamically using call user func and i keep on getting this issue.

the code i am using is call_user_func(array("Note", "create"), array("note"=>"hi));

Why is this not working...


Fatal error: Uncaught exception 'ActiveRecord\UndefinedPropertyException' with message 'Undefined property:Note->0 in /Applications/XAMPP/xamppfiles/htdocs/libraries/activerecord/lib/Model.php on line 420' in /Applications/XAMPP/xamppfiles/htdocs/libraries/activerecord/lib/Model.php:1204 Stack trace: #0 /Applications/XAMPP/xamppfiles/htdocs/libraries/activerecord/lib/Model.php(261): ActiveRecord\Model->set_attributes_via_mass_assignment(Array, true) #1 /Applications/XAMPP/xamppfiles/htdocs/libraries/activerecord/lib/Model.php(758): ActiveRecord\Model->__construct(Array, true) #2 [internal function]: ActiveRecord\Model::create(Array) #3 /Applications/XAMPP/xamppfiles/htdocs/app/controllers/notes_controller.php(104): call_user_func(Array, Array) #4 /Applications/XAMPP/xamppfiles/htdocs/libraries/router.php(77): NotesController->create() #5 /Applications/XAMPP/xamppfiles/htdocs/libraries/router.php(53): Map::dispatch('html') #6 /Applications/XAMPP/xamppfiles/htdocs/libraries/sammy.php(36): Map::pre_dispatch('notes/c in /Applications/XAMPP/xamppfiles/htdocs/libraries/activerecord/lib/Model.php on line 1204
@koenpunt koenpunt self-assigned this Feb 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants