Skip to content

Commit 2a0038a

Browse files
authored
Merge pull request #803 from newfold-labs/fix/php-7.3
Fix Fatal Error on PHP 7.3
2 parents 9896b50 + a3ef992 commit 2a0038a

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

includes/Services/ThemeService.php

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,18 @@
99
* Class for providing theme related services.
1010
*/
1111
class ThemeService {
12-
private static $retries = 0;
12+
/**
13+
* Number of retry attempts made.
14+
*
15+
* @var int
16+
*/
17+
private static $retries = 0;
18+
19+
/**
20+
* Maximum number of retries allowed.
21+
*
22+
* @var int
23+
*/
1324
private static $max_retries = 3;
1425

1526
/**
@@ -33,7 +44,7 @@ private static function retry(): bool {
3344
*/
3445
public static function initialize(): bool {
3546
// Get the default sitegen theme to be installed.
36-
$init_themes = Themes::get_init( skip_plan_check: true );
47+
$init_themes = Themes::get_init( true );
3748
$sitegen_theme = $init_themes['sitegen']['default'][0];
3849

3950
// If the sitegen theme is NOT installed or activated...
@@ -51,9 +62,9 @@ public static function initialize(): bool {
5162

5263
// Install and activate the sitegen theme.
5364
$installer_response = ThemeInstaller::install_from_zip(
54-
url: $sitegen_theme_installer_data['url'],
55-
activate: true,
56-
stylesheet: $sitegen_theme_installer_data['stylesheet']
65+
$sitegen_theme_installer_data['url'],
66+
true,
67+
$sitegen_theme_installer_data['stylesheet']
5768
);
5869

5970
// If the installation fails, retry.

0 commit comments

Comments
 (0)