Changeset 816 for trunk/lib


Ignore:
Timestamp:
Jul 3, 2024 1:26:01 AM (3 months ago)
Author:
anonymous
Message:

Minor fixes

Location:
trunk/lib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Logger.inc.php

    r662 r816  
    178178        case LOG_INFO:
    179179        case LOG_DEBUG:
    180             $app->logMsg(sprintf('%s (%s)', (string)$message, getDump($context)), LOG_CRIT, __FILE__, __LINE__);
     180            $app->logMsg(sprintf('%s (%s)', (string)$message, getDump($context)), $level, __FILE__, __LINE__);
    181181            break;
    182182
  • trunk/lib/Navigation.inc.php

    r810 r816  
    440440        }
    441441
     442        if (empty($test_uri)) {
     443            return $false_return;
     444        }
     445
    442446        $actual_uri = $include_query ? $_SERVER['REQUEST_URI'] : (strstr(getenv('REQUEST_URI'), '?', true) ?: getenv('REQUEST_URI')); // strstr() returns false if '?' is not found, so use a shorthand ternary operator.
    443447        $test_uri = $include_query ? $test_uri : (strstr($test_uri, '?', true) ?: $test_uri); // strstr() returns false if '?' is not found, so use a shorthand ternary operator.
  • trunk/lib/Utilities.inc.php

    r814 r816  
    18291829{
    18301830    $context = stream_context_create(['http' => ['method' => $method]]);
    1831     $headers = get_headers($url, 1, $context);
     1831    // Silence warning: PHP Warning:  get_headers() expects at most 2 parameters, 3 given
     1832    $headers = @get_headers($url, 1, $context);
    18321833    $app =& \App::getInstance();
    18331834    $app->logMsg(sprintf('HTTP response headers for %s %s: %s', strtoupper($method), $url, getDump($headers, true, SC_DUMP_JSON)), LOG_DEBUG, __FILE__, __LINE__);
Note: See TracChangeset for help on using the changeset viewer.