Skip to content

Commit

Permalink
Move back to call_user_func_array
Browse files Browse the repository at this point in the history
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!
  • Loading branch information
matthiasmullie committed Dec 9, 2022
1 parent 11c7b04 commit aa8010c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/JS.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit aa8010c

Please sign in to comment.