Skip to content

Commit 24406af

Browse files
committed
Minor optimizations with ternary operators
1 parent 9c77a3c commit 24406af

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.router.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
$_SERVER["SERVER_ADDR"] = $_SERVER["HTTP_HOST"];
33

4-
$filename = isset($_SERVER["PATH_INFO"]) ? $_SERVER["PATH_INFO"] : $_SERVER["SCRIPT_NAME"];
4+
$filename = $_SERVER["PATH_INFO"] ?? $_SERVER["SCRIPT_NAME"];
55

66
if (file_exists($_SERVER["DOCUMENT_ROOT"] . $filename)) {
77
/* This could be an image or whatever, so don't try to compress it */

images/logo.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
$refresh = isset($_GET['refresh']) ? true : false;
3+
$refresh = isset($_GET['refresh']);
44

55
// Be 100% sure the timezone is set
66
if (ini_get('date.timezone') === '' && function_exists('date_default_timezone_set')) {

0 commit comments

Comments
 (0)