• Hi!

    My solution removes the Notice warning (because undefined index):

    function qtrans_parseURL($url) {
    	$r  = '!(?:(\w+)://)?(?:(\w+)\:(\w+)@)?([^/:]+)?';
    	$r .= '(?:\:(\d*))?([^#?]+)?(?:\?([^#]+))?(?:#(.+$))?!i';
    
    	preg_match ( $r, $url, $out );
    	$result = @array(
    			"scheme" => isset($out[1])?$out[1]:'',
    			"host" => (isset($out[4])?$out[4]:'').((isset($out[5]) && $out[5]!='')?':'.$out[5]:''),
    			"user" => isset($out[2])?$out[2]:'',
    			"pass" => isset($out[3])?$out[3]:'',
    			"path" => isset($out[6])?$out[6]:'',
    			"query" => isset($out[7])?$out[7]:'',
    			"fragment" => isset($out[8])?$out[8]:''
    	);
    	return $result;
    }

    Change: check of exsistence.

    https://www.ads-software.com/plugins/mqtranslate/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Suggestion for remove notce warning’ is closed to new replies.