Update string.php

This commit is contained in:
myvesta 2020-08-30 05:15:23 +02:00 committed by GitHub
parent a2be18cc18
commit 147e75412f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,7 +5,7 @@ function myvesta_replace_in_file($find, $replace, $file) {
$buf=file_get_contents($file);
if (strpos($buf, $find)===false) return myvesta_throw_error (MYVESTA_ERROR_STRING_DOES_NOT_EXISTS, "String '$find' not found");
if (strpos($buf, $find)===false) return myvesta_throw_error (MYVESTA_ERROR_STRING_NOT_FOUND, "String '$find' not found");
$buf=str_replace($find, $replace, $buf);
$r=file_put_contents($file, $buf);