Skip to content

Commit 497bcbb

Browse files
committed
Check if the variable exists before using it
1 parent c4f561d commit 497bcbb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/JsonColumnTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ public function fromJson($value, $asObject = false)
233233
*/
234234
protected function originalIsEquivalent($key, $current)
235235
{
236-
if (in_array($key, $this->json_columns) && is_array($current)) {
236+
if (isset($this->json_columns) && in_array($key, $this->json_columns) && is_array($current)) {
237237
$current = json_encode($current);
238238
}
239239

0 commit comments

Comments
 (0)