Skip to content

Commit cfdb904

Browse files
committedSep 4, 2024
fix deprecated functionality
1 parent 7a926a4 commit cfdb904

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed
 

‎Block/Scripts.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ public function __construct(
3232
array $data = []
3333
)
3434
{
35+
parent::__construct($context, $data);
3536
$this->configuration = $configuration;
3637
$this->_helper = $mediaHelper;
37-
parent::__construct($context, $data);
3838
}
3939

4040
/**

‎Ui/Component/Control/AddFromCloudinary.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ public function __construct(
4343
*/
4444
public function getButtonData(): array
4545
{
46-
$cloudinaryMLwidgetOprions = json_decode($this->images->getCloudinaryMediaLibraryWidgetOptions(),true);
47-
46+
$cloudinaryMLwidgetOprions = ($this->images->getCloudinaryMediaLibraryWidgetOptions())
47+
? json_decode($this->images->getCloudinaryMediaLibraryWidgetOptions(),true)
48+
: null;
4849

4950
$buttonData = [
5051
'label' => __('Add From Cloudinary'),

0 commit comments

Comments
 (0)
Please sign in to comment.