I get the following PHP notices/errors and none of the “fixes” I’ve found while searching and googling seem to work:
[CODE]Notice: Undefined variable: display in C:wwwREMOVED.comfolderfile.php on line 44
[CODE]Notice: Undefined variable: uncached_container in C:wwwREMOVED.comfolderfile.php on line 44
Here is the code snippet in question:
[code=php]…
if ((PAGE_CACHE_ENABLE > 1) && !$kill_cache && !isset($_REQUEST[‘template_display’]) && !isset($_REQUEST[‘action’]) && !isset($_REQUEST[‘search_options’]) && !preg_match(‘/?print$/’, $_SERVER[‘REQUEST_URI’])){
$res = mysql_query(‘SELECT * FROM ‘ . PAGE_DB_PREFIX . ‘CacheData WHERE url = ” . md5(CACHE_URL) . ”’);
while ($row = mysql_fetch_assoc($res)){
if ($row[‘body’]){
echo ‘<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>’ . “n”;
//echo ‘Cached’;
$display = $row[‘body’];
//<!–NoCache container/login.tpl–>
if (PAGE_CACHE_ENABLE == 2){
preg_match_all(‘/<!–NoCache ([a-zA-Z0-9_/.]+)–>/’, $display, $arr);
$uncached_container = array_unique($arr[1]);
}
if (empty($uncached_container)){
$display = str_replace(‘$generation_time$’, ‘0s’, $row[‘body’]);
echo $display;
exit;
}
}
}
}
$result = array($display, $uncached_container);
return $result;
}
…
I know I can add the following to the file, but that feels like a band-aid instead of a real fix:
[code=php]error_reporting(E_ALL ^ E_NOTICE);
I’m sure the proper fix is as easy as 1,2,3… but it eludes me.
Anyone have any ideas?