From 1cf5f6e070b8d4537d0e29797bcff2485ff689bf Mon Sep 17 00:00:00 2001 From: Jeff Heidel Date: Fri, 25 Nov 2022 09:12:27 -0800 Subject: [PATCH] Fix breakages from php 8.1 upgrade. https://github.com/amekkawi/diskusagereports/issues/13 --- scripts/inc/find.class.php | 4 ++-- scripts/inc/process.class.php | 4 ++-- scripts/process.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/inc/find.class.php b/scripts/inc/find.class.php index 4bdb815..54c310d 100644 --- a/scripts/inc/find.class.php +++ b/scripts/inc/find.class.php @@ -28,7 +28,7 @@ class Find { var $_ds; var $_delim; - function Find() { + function __construct() { $this->_ds = DIRECTORY_SEPARATOR; $this->_delim = " "; } @@ -202,4 +202,4 @@ function setDelim($delim) { $this->_delim = $delim; } } -?> \ No newline at end of file +?> diff --git a/scripts/inc/process.class.php b/scripts/inc/process.class.php index b75265c..07e7ab8 100644 --- a/scripts/inc/process.class.php +++ b/scripts/inc/process.class.php @@ -103,7 +103,7 @@ class Process { var $_col_depth; var $_col_path; - function Process() { + function __construct() { $this->_name = NULL; $this->_fileList = NULL; $this->_reportDir = NULL; @@ -922,7 +922,7 @@ function _makeLocalTime($date, $time) { ); } - function _top100Comparator($listitem, $needle) { + static function _top100Comparator($listitem, $needle) { return BigVal($listitem['size']) - BigVal($needle); } diff --git a/scripts/process.php b/scripts/process.php index 9e20e13..472fbdf 100644 --- a/scripts/process.php +++ b/scripts/process.php @@ -283,7 +283,7 @@ exit(1); } elseif (is_null($cliarg = array_shift($cliargs))) { - continue; + break; } default: if (is_null($processor->getReportDir())) {