Jump to content

RocketTheme Gantry parse_url notices


adam parker1424296087

Recommended Posts

This might not be a jReviews issue as much of a rockettheme issue, but no one has responded to my 2 posts over there so maybe it's a jReviews issue and I just do not know enough.

 

I get this error on all jReviews searches and sometimes just one random jReviews links:

 

 

Warning: parse_url(/news/optometry/tag/webbasedod/Web-Based_m67/cat:62/jr_specialties:Optometry) [function.parse-url]: Unable to parse URL in /home/site/public_html/mysite.com/components/com_gantry/core/utilities/gantryurl.class.php on line 18

 

It happens on this link:

http://www.mysite.com/news/optometry/tag/webbasedod/Web-Based_m67/cat:62/jr_specialties:Optometry

 

this is the function in the file the error is referring to (line 18 is

$aUrl = parse_url($sUrl);

function explode($sUrl) {
           $aUrl = parse_url($sUrl);
           $aUrl['query_params'] = array();
           $aPairs = array();
           if (array_key_exists('query',$aUrl))
           {
               $aUrl['query'] = preg_replace('/&(?!amp;)/i','&', $aUrl['query']);
               $aPairs = explode('&', $aUrl['query']);
           }
           foreach($aPairs as $sPair) {
               if (trim($sPair) == '') { continue; }
               if (strpos($sPair,'=') !== false){
                   list($sKey, $sValue) = explode('=', $sPair);
                   $aUrl['query_params'][$sKey] = urldecode($sValue);
               }
               else{
                    $aUrl['query_params'][$sPair] = '';
               }


           }
           return $aUrl;
       }

Link to comment
×
×
  • Create New...