thephpleague / flysystem

Abstraction for local and remote filesystems

Home Page:https://flysystem.thephpleague.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Strpos result comparison

yannouche34490 opened this issue · comments

if (strpos($path, '://') < 1) {

Hello,

when you make comparison between strpos result and 1, PHP will cast the result to a int even if function returns false. It can result an unexpected true comparison.

Best regards.

In this it's not a problem, because false would convert to -1 and that would mean there is no ://, which also would be incorrect