[ 
https://issues.apache.org/jira/browse/SHINDIG-355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12609874#action_12609874
 ] 

Chris Chabot commented on SHINDIG-355:
--------------------------------------

When i ran the test gadget (maybe i forgot some steps, will investigate next) i 
get these error's:
<br />
<b>Notice</b>:  Undefined index:  c604137216670952df847ca81a9c3ea4 in 
<b>/Users/chabotc/shindig/php/src
/gadgets/oauth/BasicOAuthStore.php</b> on line <b>70</b><br />

You should always check if array entries exist, so that code in question should 
be:
                $consumerKeyAndSecret = null;
                if (isset($this->consumerInfos[$key])) {
                        $consumerKeyAndSecret = $this->consumerInfos[$key];
                }
                if ($consumerKeyAndSecret == null) {

That way the code after it (throw exception on $consumerKeyAndSecret == null) 
actually gets triggered and error handling proceeds as intended, without 
notices etc :)

<br />
<b>Fatal error</b>:  Call to a member function getAccessor() on a non-object in 
<b>/Users/chabotc/shindig
/php/src/gadgets/oauth/OAuthFetcher.php</b> on line <b>257</b><br />

Checking this function and doing a print_r on $this->accessorInfo i see that it 
is a non-set (null) value, so of cource $this->accessorInfo->getAccessor()... 
fails ... it's simply not an object.

Again some error checking here would've been prudent, 

In general it seems for me $this->accessorInfo is always NULL, this might be 
because i didn't follow all the correct steps, but that doesn't mean that if 
some key or information is missing we should just spit out PHP errors.

Those errors should be caught, and a propper, diagnostic should be output, 
testing error handling (invalid keys, missing config, etc) is just as useful as 
testing the working situation

> OAuth in gadget xml spec 
> -------------------------
>
>                 Key: SHINDIG-355
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-355
>             Project: Shindig
>          Issue Type: New Feature
>          Components: Gadget Rendering Server (PHP)
>            Reporter: Chris Chabot
>         Attachments: feature-SHINDIG-355.patch
>
>
> Instead of having a new oauth feature, the proposal is to put it directly 
> into the gadget xml spec. Should parse and support the oauth feature.
> See: 
> http://www.google.com/url?q=http://groups.google.com/group/opensocial-and-gadgets-spec/browse_frm/thread/a1ce63eecfb21cad&sa=D&usg=ALhdy2-tUxagajVfd0hx98L5CubK3S340Q

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to