andeedee / gapi-google-analytics-php-interface

Automatically exported from code.google.com/p/gapi-google-analytics-php-interface
0 stars 0 forks source link

Undefined variable in gapi::accountObjectMapper() #12

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I found undefined object $google_results in private method 
accountObjectMapper in gapi class:

    protected function accountObjectMapper($xml_string) {

        ...

        $account_root_parameters['startDate'] = strval($google_results-
>startDate);
        $account_root_parameters['endDate'] = strval($google_results-
>endDate);

        //Load result entries

        ...

        return $results;
    }

What version of the product are you using?
Gapi 1.3

Personally, this bug is for me a little irrelevant, but maybe, for you 
(developers) it may help. Maybe it is forgotten variable which may cause 
unexpected output.

Original issue reported on code.google.com by tomas.pe...@gmail.com on 28 Jul 2009 at 1:46

GoogleCodeExporter commented 9 years ago
On line 276 in the gapi.class.php add:

$google_results = $xml->children('http://schemas.google.com/analytics/2009');

Original comment by george.anchev on 13 Aug 2009 at 9:54

GoogleCodeExporter commented 9 years ago
To solve this bug, replace the variable $google_results with $xml and 
everything will work as expected. 
Tested with gapi 1.3

Cheers

Original comment by admin%ma...@gtempaccount.com on 10 Feb 2011 at 7:15

GoogleCodeExporter commented 9 years ago
Your a life save! Thank you!

Original comment by etr...@gmail.com on 29 Jun 2011 at 3:31

GoogleCodeExporter commented 9 years ago
awesome, thanks for that fix

Original comment by arthurj...@gmail.com on 3 Jul 2011 at 6:13

GoogleCodeExporter commented 9 years ago
please, don't use a texteditor for professional coding, if you use a modern IDE 
(like eclipse or phpstorm) this bug is instant highlighted
I downloaded this package 5 minutes ago, opened in phpstorm (the ide i use) and 
WOAAM.. buggy (the file is marked red, because of this bug).. so sad that this 
is so usally in the php world...
but thanks for fix   

Original comment by goo...@schottenland.de on 31 Jul 2011 at 10:49