Skip to content

Commit 64dd5a9

Browse files
Fix deprecation error messages on PHP 8.1 (#30)
1 parent be3be4f commit 64dd5a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Block.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ public function attrsAsString()
223223
$attrs = [];
224224

225225
foreach ($this->attrs as $key => $value) {
226-
$value = addslashes($value);
226+
$value = addslashes($value ?? '');
227227
$attrs[] = "$key=\"$value\"";
228228
}
229229

@@ -263,7 +263,7 @@ public function spawnClones()
263263
{
264264
$this->clones = [];
265265

266-
$themes = explode(',', $this->theme);
266+
$themes = explode(',', $this->theme ?? '');
267267

268268
// Set the theme for the current block, so that we
269269
// don't break the reference to it.

0 commit comments

Comments
 (0)