From df3a7c15358627ebc6d3144985ff721be1e84873 Mon Sep 17 00:00:00 2001 From: its Date: Fri, 24 Dec 2021 13:09:19 +0100 Subject: [PATCH] Laravel - fixed possible PHP 8.1 deprecation warning when collecting database queries. --- Clockwork/DataSource/EloquentDataSource.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Clockwork/DataSource/EloquentDataSource.php b/Clockwork/DataSource/EloquentDataSource.php index 318ced83..8c7ab4b1 100644 --- a/Clockwork/DataSource/EloquentDataSource.php +++ b/Clockwork/DataSource/EloquentDataSource.php @@ -236,10 +236,10 @@ protected function createRunnableQuery($query, $bindings, $connection) $binding = $this->quoteBinding($bindings[$index++], $connection); // convert binary bindings to hexadecimal representation - if (! preg_match('//u', $binding)) $binding = '0x' . bin2hex($binding); + if (! preg_match('//u', (string) $binding)) $binding = '0x' . bin2hex($binding); // escape backslashes in the binding (preg_replace requires to do so) - return str_replace('\\', '\\\\', $binding); + return str_replace('\\', '\\\\', (string) $binding); }, $query, count($bindings)); // highlight keywords