From 9118e43452f404fcee07dbe9c0b23eb3c0352977 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Wed, 4 Aug 2021 15:31:53 +0200 Subject: [PATCH] Fix client generate replace of occurence in php files --- app/Console/Commands/GenerateCrmClient.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Console/Commands/GenerateCrmClient.php b/app/Console/Commands/GenerateCrmClient.php index 4e01f29..35e1618 100644 --- a/app/Console/Commands/GenerateCrmClient.php +++ b/app/Console/Commands/GenerateCrmClient.php @@ -158,7 +158,7 @@ class GenerateCrmClient extends Command // replace namespace top level $pos = strpos($fContent, $search); if ($pos !== false) { - File::put($source, substr_replace($fContent, $replace, $pos, strlen($search))); + File::put($source, \str_replace($search, $replace, $fContent)); } } }