mirror of
https://github.com/standardebooks/web.git
synced 2025-07-08 07:40:39 -04:00
Switch to new array shorthand
This commit is contained in:
parent
acdc7eb639
commit
7be2f18424
4 changed files with 4 additions and 4 deletions
|
@ -13,7 +13,7 @@ date_default_timezone_set('UTC');
|
||||||
// Custom error handler to output more details about the specific Apache request that caused an exception.
|
// Custom error handler to output more details about the specific Apache request that caused an exception.
|
||||||
set_exception_handler(function(Throwable $ex): void{
|
set_exception_handler(function(Throwable $ex): void{
|
||||||
$errorString = "----------------------------------------\n";
|
$errorString = "----------------------------------------\n";
|
||||||
$errorString .= trim(vds(array_intersect_key($_SERVER, array('REQUEST_URI' => '', 'QUERY_STRING' => '', 'REQUEST_METHOD' => '', 'REDIRECT_QUERY_STRING' => '', 'REDIRECT_URL' => '', 'SCRIPT_FILENAME' => '', 'REMOTE_ADDR' => '', 'HTTP_COOKIE' => '', 'HTTP_USER_AGENT' => '', 'SCRIPT_URI' => ''))));
|
$errorString .= trim(vds(array_intersect_key($_SERVER, ['REQUEST_URI' => '', 'QUERY_STRING' => '', 'REQUEST_METHOD' => '', 'REDIRECT_QUERY_STRING' => '', 'REDIRECT_URL' => '', 'SCRIPT_FILENAME' => '', 'REMOTE_ADDR' => '', 'HTTP_COOKIE' => '', 'HTTP_USER_AGENT' => '', 'SCRIPT_URI' => ''])));
|
||||||
|
|
||||||
if(sizeof($_POST) > 0){
|
if(sizeof($_POST) > 0){
|
||||||
$errorString .= "POST DATA:\n";
|
$errorString .= "POST DATA:\n";
|
||||||
|
|
|
@ -34,7 +34,7 @@ class HttpInput{
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function GetHttpVar(string $variable, int $type, int $set, $default){
|
private static function GetHttpVar(string $variable, int $type, int $set, $default){
|
||||||
$vars = array();
|
$vars = [];
|
||||||
|
|
||||||
switch($set){
|
switch($set){
|
||||||
case GET:
|
case GET:
|
||||||
|
|
|
@ -6,7 +6,7 @@ use function Safe\getopt;
|
||||||
use function Safe\preg_replace;
|
use function Safe\preg_replace;
|
||||||
use function Safe\sort;
|
use function Safe\sort;
|
||||||
|
|
||||||
$longopts = array("webroot:", "weburl:");
|
$longopts = ["webroot:", "weburl:"];
|
||||||
$options = getopt("", $longopts);
|
$options = getopt("", $longopts);
|
||||||
$webRoot = $options["webroot"] ?? "/standardebooks.org/web";
|
$webRoot = $options["webroot"] ?? "/standardebooks.org/web";
|
||||||
$webUrl = $options["weburl"] ?? "https://standardebooks.org";
|
$webUrl = $options["weburl"] ?? "https://standardebooks.org";
|
||||||
|
|
|
@ -7,7 +7,7 @@ use function Safe\krsort;
|
||||||
use function Safe\preg_replace;
|
use function Safe\preg_replace;
|
||||||
use function Safe\strtotime;
|
use function Safe\strtotime;
|
||||||
|
|
||||||
$longopts = array("webroot:", "weburl:");
|
$longopts = ["webroot:", "weburl:"];
|
||||||
$options = getopt("", $longopts);
|
$options = getopt("", $longopts);
|
||||||
$webRoot = $options["webroot"] ?? "/standardebooks.org/web";
|
$webRoot = $options["webroot"] ?? "/standardebooks.org/web";
|
||||||
$webUrl = $options["weburl"] ?? "https://standardebooks.org";
|
$webUrl = $options["weburl"] ?? "https://standardebooks.org";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue