Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

in is_mobile(); strpos would return false if the string is not found, but would return 0 if the string is in the first character #59

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
1 participant

0 still means false, so i changed it to a typed comparation to false (!==, notice the extra equal sign).

in that case, you don't have to bother with another if to assign $is_mobile, so i changed it to a direct assignment

in is_mobile(); strpos would return false if the string is not found,…
… but would return 0 if the string is in the first character, still meaning false, so i changed it to a typed comparation to false (!==, not ==).


in that case, you don't have to bother with another if to assign $is_mobile, so i changed it to a direct assignment

@fourlastor fourlastor closed this Feb 13, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment