Skip to content

Commit 23cc11c

Browse files
committed
Merge branch 'master' into 3.1
# Conflicts: # .github/workflows/test.yml # src/service-governance/src/Listener/RegisterServiceListener.php # src/stringable/composer.json # src/stringable/tests/StrTest.php
2 parents 8533867 + 4d2d9ed commit 23cc11c

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout code
15-
uses: actions/checkout@v2
15+
uses: actions/checkout@v4
1616
- name: Create Release
1717
id: create_release
1818
uses: actions/create-release@v1

src/Concerns/ValidatesAttributes.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -893,6 +893,14 @@ public function validateJson(string $attribute, $value): bool
893893
$value = (string) $value;
894894
}
895895

896+
if (! is_string($value)) {
897+
return false;
898+
}
899+
900+
if (function_exists('json_validate')) {
901+
return json_validate($value);
902+
}
903+
896904
try {
897905
json_decode($value, flags: JSON_THROW_ON_ERROR);
898906
} catch (Throwable) {

0 commit comments

Comments
 (0)