Skip to content

Commit 49f7c87

Browse files
authored
Merge pull request #285 from marshmallow-packages/hotfix/php-8.4-deprecation-fixes
Fix PHP 8.4 deprecation warnings
2 parents c0c8e2d + 5821d7f commit 49f7c87

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/TinyMCE.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class TinyMCE extends Field
1818
*/
1919
public $component = 'Nova-TinyMCE';
2020

21-
public function __construct(string $name, $attribute = null, callable $resolveCallback = null)
21+
public function __construct(string $name, $attribute = null, ?callable $resolveCallback = null)
2222
{
2323
parent::__construct($name, $attribute, $resolveCallback);
2424

@@ -80,8 +80,9 @@ protected function buildOptionsArray()
8080
$options = array_merge($options, $extra_options);
8181
}
8282

83-
if (config('nova-tinymce.formats') && !empty(config('nova-tinymce.formats'))) {
84-
$options['formats'] = config('nova-tinymce.formats');
83+
$formats = config('nova-tinymce.formats');
84+
if ($formats && !empty($formats)) {
85+
$options['formats'] = $formats;
8586
}
8687

8788
if ($custom_items = config('nova-tinymce.custom_items')) {

0 commit comments

Comments
 (0)