mirror of https://github.com/MISP/MISP
fix: [login_history] fixes str_contains #9433
parent
2cb597d495
commit
8fe484030d
|
@ -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';
|
||||
|
|
Loading…
Reference in New Issue