Skip to content

Commit

Permalink
fix: [login_history] fixes str_contains #9433
Browse files Browse the repository at this point in the history
  • Loading branch information
cvandeplas committed Dec 7, 2023
1 parent 2cb597d commit 8fe4840
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/View/Users/view_login_history.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ echo sprintf('<div%s>', !$this->request->is('ajax') ? ' class="index"' : '');
}
</style>
<?php
if (!function_exists('str_contains')) {
function str_contains(string $haystack, string $needle): bool {
return '' === $needle || false !== strpos($haystack, $needle);
}
}

foreach($data as $entry ){
$platform = h(strtolower($entry['platform']));
if (str_contains($platform, 'win')) $platform = 'windows';
Expand Down

0 comments on commit 8fe4840

Please sign in to comment.