diff options
author | Robin Appelman <robin@icewind.nl> | 2023-09-21 16:34:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-21 16:34:27 +0200 |
commit | ef87ff18487d4d78a392f7e44cd9f094a0a73371 (patch) | |
tree | 9b53b4478ef21a97ad917ecd4b12f1e14cf48512 /lib/private/legacy | |
parent | 667e9f783d63fcacec664678b5b1ffe8aa7c22ba (diff) | |
parent | 0808e19540b0bb79926101efb7d61af3055c9774 (diff) | |
download | nextcloud-server-ef87ff18487d4d78a392f7e44cd9f094a0a73371.tar.gz nextcloud-server-ef87ff18487d4d78a392f7e44cd9f094a0a73371.zip |
Merge pull request #39216 from shdehnavi/replace_substr_calls_in_lib_private
Refactor "substr" calls in lib/private to improve code readability
Diffstat (limited to 'lib/private/legacy')
-rw-r--r-- | lib/private/legacy/OC_API.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/legacy/OC_API.php b/lib/private/legacy/OC_API.php index 275e02986c4..862e73e6edd 100644 --- a/lib/private/legacy/OC_API.php +++ b/lib/private/legacy/OC_API.php @@ -130,7 +130,7 @@ class OC_API { protected static function isV2(\OCP\IRequest $request) { $script = $request->getScriptName(); - return substr($script, -11) === '/ocs/v2.php'; + return str_ends_with($script, '/ocs/v2.php'); } /** |