fixes to google analytics to check if response is valid

master
Nathan Adams 2015-06-02 21:42:27 -05:00
parent 4febdda65f
commit fd162f97fc
1 changed files with 3 additions and 0 deletions

View File

@ -40,6 +40,9 @@ class Pluf_Middleware_GoogleAnalytics
*/
function process_response($request, $response)
{
if (isset($response) && !isset($response->status_code))
return $response;
if (!Pluf::f('google_analytics_id', false)) {
return $response;
}