1
0
mirror of https://github.com/e107inc/e107.git synced 2025-03-14 01:19:44 +01:00

Removed some PHP notices occurring in CLI mode.

This commit is contained in:
Cameron 2020-08-10 18:13:59 -07:00
parent e1593de8ee
commit 0f02e9a9a2
2 changed files with 14 additions and 3 deletions

View File

@ -1532,7 +1532,7 @@ if(!defined("THEME_LAYOUT"))
$pref = e107::getPref();
$cusPagePref = (!empty($user_pref['sitetheme_custompages'])) ? $user_pref['sitetheme_custompages'] : varset($pref['sitetheme_custompages'],array());
$cusPageDef = (empty($user_pref['sitetheme_deflayout'])) ? varset($pref['sitetheme_deflayout'],'') : $user_pref['sitetheme_deflayout'];
$deflayout = e107::getTheme()->getThemeLayout($cusPagePref, $cusPageDef, e_REQUEST_URL, $_SERVER['SCRIPT_FILENAME']);
$deflayout = e107::getTheme()->getThemeLayout($cusPagePref, $cusPageDef, e_REQUEST_URL, varset($_SERVER['SCRIPT_FILENAME']));
define("THEME_LAYOUT",$deflayout);

View File

@ -168,6 +168,17 @@ class _system_cron
$message .= $this->renderTable($_SERVER);
$message .= "<h3>_ENV</h3>";
$message .= $this->renderTable($_ENV);
$message .= "<h3>LAST ERROR</h3>";
$message .= "<pre>".print_r(error_get_last(), true)."</pre>";
$message .= "<h3>HEADERS LIST</h3>";
$message .= "<pre>".print_r(headers_list(),true)."</pre>";
$message .= "<h3>Included Files</h3>";
$included_files = get_included_files();
foreach ($included_files as $filename)
{
$message .= $filename."<br />";
}
$eml = array(
'subject' => "TEST Email Sent by cron. ".date("r"),
@ -459,7 +470,7 @@ class CronParser
function calcLastRan($string)
{
$tstart = microtime();
$tstart = microtime(true);
$this->debug = "";
$this->lastRan = 0;
$this->year = NULL;
@ -589,7 +600,7 @@ class CronParser
}
}
$tend = microtime();
$tend = microtime(true);
$this->taken = $tend - $tstart;
$this->debug("Parsing $string taken " . $this->taken . " seconds");