oauth_common_form_consumer_delete() is declared as

function oauth_common_form_consumer_delete($form_state, $consumer) {

when it should be declared as

function oauth_common_form_consumer_delete($form, $form_state, $consumer) {

This causes the delete to fail since $consumer is incorrectly set.

CommentFileSizeAuthor
#8 oauth-1431642-consumer-deletion.patch515 byteskotnik
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

stevesmename’s picture

Call to a member function delete() on a non-object in oauth_common.consumers.inc on line 255

I believe the error above is regarding this issue. I'm unable to delete an application.

nevets’s picture

Yes, this bug is the cause of that error.

jobeirne’s picture

Good catch, nevets, though `$form_state` should be `&$form_state`. Committing now.

jobeirne’s picture

Status: Active » Closed (fixed)
Alex Andrascu’s picture

Status: Closed (fixed) » Fixed

Leave it open for a while until you either release a stable "stable" version or until it closes by itself (2 weeks), so people can still find the fix. Was just going to abandon all hopes until I thought to give closed a try.

Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

muka’s picture

Hi, I reopen this because I got the same problem.

Call to a member function delete() on a non-object in oauth_common.consumers.inc on line 255

oaut_common.consumer.inc, line252

function oauth_common_form_consumer_delete_submit($form, &$form_state) {
-  $consumer = $form_state['values']['consumer_object'];
+  $consumer = $form_state['build_info']['args'][0];

kotnik’s picture

Patch with this fix attached (if somebody needs this for Drush make file).