Hi,
When trying to delete an consumer I get the following error:
Trying to get property of non-object in oauth_common_form_consumer_delete()
followed by a WSOD.
Looking at the function I assume the $consumer varible paste to it is in the wrong format. However this hack fixes it as well:
function oauth_common_form_consumer_delete($form_state, $consumer) {
drupal_set_message ("
".print_r($consumer, TRUE)."
");
$form = array(
'consumer_object' => array(
'#type' => 'value',
'#value' => $consumer['build_info']['args'][0],
),
'confirm' => array(
'#type' => 'item',
'#markup' => t('Are you sure you want to delete application @a?', array('@a' => $consumer['build_info']['args'][0]->name)),
),
gr w
Comment | File | Size | Author |
---|---|---|---|
#3 | oauth-fix_for_non_object_consumer_delete-1678632-6751214.patch | 1.22 KB | alejandrard |
Comments
Comment #1
alejandrard CreditAttribution: alejandrard commentedThis hack will also works.
Comment #2
alejandrard CreditAttribution: alejandrard commentedAfter testing for a while found that it needed a little more than the hacks describe above.
Adding this two lines to the top of function
oauth_common_form_consumer_delete
and and change#value
onconsumer_object
from$consumer
to$consumer_object
.Adding this two lines to the top of function
oauth_common_form_consumer_delete_submit
Comment #3
alejandrard CreditAttribution: alejandrard commentedHere is the patch for the comment #2
Comment #4
rjbrown99 CreditAttribution: rjbrown99 commentedPatch here, changing status.