In function mobile_detect_check_type() $rules variable has keyed array for devices and array('Mobile', 'Tablet', 'Handheld'). So, in_array() function finds only this three items ('Mobile', 'Tablet', 'Handheld'). I propose check key and value in array.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 0001-Fix-mobile_detect_check_type-change-rules-array.patch | 1.04 KB | goodboy |
| #3 | 0001-Fix-mobile_detect_check_type.patch | 865 bytes | goodboy |
Comments
Comment #2
goodboy commentedComment #3
goodboy commentedComment #4
göran commentedThank's this patch solved my problem: Mobile Detect missed iphone, did not recognize.
Comment #5
mpdonadioI'd rather change the $rules array to match what $detect->getRules() returns than have two types of checks.
Also curious if this is a change in the way Mobile_Detect.php works, or a bug that has always existed.
Comment #6
goodboy commentedI put second patch to replace previous one.
Comment #7
goodboy commentedComment #8
göran commented#goodboy - is #7 patch a new patch instead of #3 or the second patch in a chain of two?
Comment #9
goodboy commented@Göran, the last patch is a new patch instead of #3 . You do not need to install it if you have installed the patch #3.
Comment #10
izmeez commentedClearly the patch in #3 and #6 are different. It appears that the new patch in #6 is the one to test against.
Comment #11
nonom commentedActually we cannot test 7.x in the Drupal.org CI . But I can test it myself.
Comment #12
nonom commentedComment #13
nonom commentedComment #14
izmeez commentedPatch in comment #6 still applies to latest version.
Comment #15
nonom commentedThanks if you see any other patch pending to commit let me know to review it.
Comment #17
nonom commentedAdded to the 7.1-x-dev branch and going to be released.
Thanks for the contribution!
Comment #18
nonom commented