fix: [login_history] fixes str_contains #9433

pull/9440/head
Christophe Vandeplas 2023-12-07 12:31:06 +01:00
parent 2cb597d495
commit 8fe484030d
1 changed files with 6 additions and 0 deletions

View File

@ -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';