Skip to content

Commit 8621870

Browse files
committed
formatting
1 parent ae4b96a commit 8621870

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Illuminate/Database/Query/Builder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2605,9 +2605,9 @@ public function value($column)
26052605
*/
26062606
public function rawValue(string $expression, array $bindings = [])
26072607
{
2608-
if ($result = $this->selectRaw($expression, $bindings)->take(1)->first()) {
2609-
return reset($result);
2610-
}
2608+
$result = (array) $this->selectRaw($expression, $bindings)->first();
2609+
2610+
return count($result) > 0 ? reset($result) : null;
26112611
}
26122612

26132613
/**

0 commit comments

Comments
 (0)