Skip to content

Commit 68385df

Browse files
authoredSep 8, 2020
Update HitCounterService.php
Fix if the browser does not detect the system ram, it does not store information in the database. If returned 'undefined' then set value 0.
1 parent 8c06c79 commit 68385df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/services/HitCounterService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ private function detectJsVisitInfo(Request $request)
7272
$data['js_browser_language']= ArrayHelper::getValue($array, 'lg');
7373
$data['js_history_length'] = ArrayHelper::getValue($array, 'hl');
7474
$data['js_is_toutch_device']= ArrayHelper::getValue($array, 'td', 0);
75-
$data['js_processor_ram'] = ArrayHelper::getValue($array, 'ram');
75+
$data['js_processor_ram'] = ArrayHelper::getValue($array, 'ram') == 'undefined' ? 0 : ArrayHelper::getValue($array, 'ram');
7676

7777
return $data;
7878
}else{

0 commit comments

Comments
 (0)