From aa8010c2fa3c26f018874141d36025085754abff Mon Sep 17 00:00:00 2001 From: Matthias Mullie Date: Fri, 9 Dec 2022 13:54:33 +0100 Subject: [PATCH] Move back to call_user_func_array This is equivalent, but removes the assumption that parent constructor will also accept a single array val as well as overloading. That assumption is true, but may not always remain true. Frankly, all of this is due for massive refactoring, but that's something for... well, not today, that's for sure! --- src/JS.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/JS.php b/src/JS.php index 7946caf..ac5e98d 100644 --- a/src/JS.php +++ b/src/JS.php @@ -127,10 +127,7 @@ class JS extends Minify */ public function __construct() { - // Can't just call parent::__construct() - if (func_num_args()) { - parent::__construct(func_get_args()); - } + call_user_func_array(array('\\MatthiasMullie\Minify\\Minify', '__construct'), func_get_args()); $dataDir = __DIR__ . '/../data/js/'; $options = FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES;