mirror of
https://github.com/e107inc/e107.git
synced 2025-04-20 20:51:53 +02:00
PHP8 Error fix for failed admin area login. Debug Paths code improvement.
This commit is contained in:
parent
c548699854
commit
c8a070de27
@ -148,6 +148,7 @@ else
|
||||
|
||||
if ($row[0] == "authfail")
|
||||
{
|
||||
e107::coreLan('log_messages', true);
|
||||
$admin_log->addEvent(4, __FILE__."|".__FUNCTION__."@".__LINE__, "LOGIN", LAN_ROLL_LOG_11, "U: ".$tp->toDB($_POST['authname']), FALSE, LOG_TO_ROLLING);
|
||||
echo "<script type='text/javascript'>document.location.href='../index.php'</script>\n";
|
||||
|
||||
|
@ -518,7 +518,7 @@
|
||||
|
||||
$obj = new ArrayObject($this->aTimeMarks);
|
||||
$it = $obj->getIterator();
|
||||
|
||||
$head = '';
|
||||
|
||||
// while(list($tKey, $tMarker) = each($this->aTimeMarks))
|
||||
foreach ($it as $tKey=>$tMarker)
|
||||
@ -807,6 +807,21 @@
|
||||
return $text;
|
||||
}
|
||||
|
||||
private function includeVar($value)
|
||||
{
|
||||
$prefix = array('ADMIN', 'E_', 'e_', 'E107', 'SITE', 'USER', 'CORE');
|
||||
|
||||
foreach($prefix as $c)
|
||||
{
|
||||
if(strpos($value, $c) === 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function Show_PATH($force = false)
|
||||
{
|
||||
|
||||
@ -841,15 +856,18 @@
|
||||
$userCon = get_defined_constants(true);
|
||||
ksort($userCon['user']);
|
||||
|
||||
|
||||
$c = 0;
|
||||
foreach($userCon['user'] as $k => $v)
|
||||
{
|
||||
if(E107_DBG_ALLERRORS || in_array($k, $inc) || substr($k, 0, 5) == 'ADMIN' || substr($k, 0, 2) == 'E_' || substr($k, 0, 2) == 'e_' || substr($k, 0, 4) == 'E107' || substr($k, 0, 4) == 'SITE' || substr($k, 0, 4) == 'USER' || substr($k, 0, 4) == 'CORE')
|
||||
if(E107_DBG_ALLERRORS || in_array($k, $inc) || $this->includeVar($k))
|
||||
{
|
||||
$text .= "
|
||||
<tr>
|
||||
<td>" . $k . "</td>
|
||||
<td>" . htmlspecialchars($v) . "</td>
|
||||
</tr>";
|
||||
$c++;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user