Jump to content

PS 1.6.13 Tools.php error


PhaseV

Recommended Posts

Hallo zusammen,

 

keine ahnung warum, aber ich habe plötzlich nur eine weiße Seite als anzeige, habe dann den Debug Modus aktiviert und erhalte folgende Fehlermeldung

 

 

Parse error: syntax error, unexpected T_STRING in /{www_path}/override/classes/Tools.php on line 18

 

Hier mal der Quellcode zu dieser Datei

<?php

class Tools extends ToolsCore
{
    /*
	* module: designerpreview
	* date: 2015-03-04 13:20:58
	* version: 1.0
	*/
	public static function redirect($url, $base_uri = __PS_BASE_URI__, Link $link = null, $headers = null)
	{
		if (!$link)
			$link = Context::getContext()->link;

		if (strpos($url, 'http:		{
			if (strpos($url, $base_uri) === 0)
				$url = substr($url, strlen($base_uri));
			if (strpos($url, 'index.php?controller=') !== false && strpos($url, 'index.php/') == 0)
			{
				$url = substr($url, strlen('index.php?controller='));
				if (Configuration::get('PS_REWRITING_SETTINGS'))
					$url = Tools::strReplaceFirst('&', '?', $url);
			}

			$explode = explode('?', $url);
									$use_ssl = !empty($url);
			$url = $link->getPageLink($explode[0], $use_ssl);
			if (isset($explode[1]))                 $url .= (strpos($url, '?') !== false ? '&' : '?' ).$explode[1];
		}

				if ($headers)
		{
			if (!is_array($headers))
				$headers = array($headers);

			foreach ($headers as $header)
				header($header);
		}

		header('Location: '.$url);
		exit;
	}
}

Wo ist das Problem? Ich habe nichts geändert. Die verwendete PS Version ist 1.6.13

 

Ich danke schonmal für eure Hilfe :)

Edited by PhaseV (see edit history)
Link to comment
Share on other sites

Well the line 18... the http string does not get the closing quote as you can spot from the green color displayed with the forum syntax coloring.

 

It seems some portion of the line get cut ... probably some thing like if (strpos($url,'http:')) {

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...