Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID

Removing a lock in an app

edited April 2013 in Apps

I'm getting this error when attempting to remove a lock: Fatal error: Call to a member function remove() on a non-object

I think it's because I added the $lock->remove()inside my edit handler's echo $form->handle (function ($form) {} block, but I'm not sure where else to put it.

Comments

  • If you created the $lock object outside of the handle function, you can pass it in like this:

    echo $form->handle (function ($form) use ($lock) {
    

    I've found myself passing the $page object in that way more and more lately.

  • edited April 2013

    If I create the $lock inside the handle function, it doesn't seem to have any effect. I'll try yYour suggestion works, thanks.

Sign In or Register to comment.