We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ce7d94e commit 5380d65Copy full SHA for 5380d65
src/UploadableModelTrait.php
@@ -145,7 +145,7 @@ private function deleteExisting($key)
145
{
146
if (str_contains($this->original[$key], 'storage')) return true;
147
148
- if (is_json($this->original[$key])) {
+ if ($this->is_json($this->original[$key])) {
149
$key = json_decode($this->original[$key]);
150
151
foreach ($key as $path) {
@@ -185,4 +185,8 @@ public function setUploadDir(string $upload_dir)
185
186
$this->upload_dir = $upload_dir;
187
}
188
+
189
+ private function is_json($string) {
190
+ return is_array(json_decode($string, true));
191
+ }
192
0 commit comments