Ignore:
Timestamp:
Feb 15, 2025, 9:29:56 AM (7 weeks ago)
Author:
chronos
Message:
  • Fixed: Showing date from null values.
  • Fixed_ Forum id validity check.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/Global.php

    r901 r902  
    311311$Moderators = array('Překladatel', 'Moderátor', 'Administrátor');
    312312
    313 function HumanDate(string $SQLDateTime): string
    314 {
    315   if ($SQLDateTime == '') return ' ';
     313function HumanDate(?string $SQLDateTime): string
     314{
     315  if (($SQLDateTime == NULL) or ($SQLDateTime == '')) return ' ';
    316316  $DateTimeParts = explode(' ', $SQLDateTime);
    317317  if ($DateTimeParts[0] != '0000-00-00')
     
    322322}
    323323
    324 function HumanDateTime(string $SQLDateTime): string
    325 {
    326   if ($SQLDateTime == '') return ' ';
     324function HumanDateTime(?string $SQLDateTime): string
     325{
     326  if (($SQLDateTime == NULL) or ($SQLDateTime == '')) return ' ';
    327327  $DateTimeParts = explode(' ', $SQLDateTime);
    328328  if ($DateTimeParts[0] != '0000-00-00' and $SQLDateTime <> '')
     
    430430function LoadCommandLineParameters(): void
    431431{
    432   if (!array_key_exists('REMOTE_ADDR', $_SERVER))
     432  if (!array_key_exists('REMOTE_ADDR', $_SERVER) && is_array($_SERVER['argv']))
    433433  {
    434434    foreach ($_SERVER['argv'] as $Parameter)
Note: See TracChangeset for help on using the changeset viewer.