sarfraznawaz2005/visitlog

Redundant parentheses cause an error

Closed this issue · 4 comments

$ip = (app('VisitLog'))->getUserIP(); - this causes an error on PHP5.6.40 (syntax error, unexpected '->' (T_OBJECT_OPERATOR))
Parentheses are here redundant. Aren't they?
This is in Sarfraznawaz2005\VisitLog\Middleware\ipCheckMiddleware class.

Can you remove those parenthesis and see if it makes difference ? I will remove these once you confirm.

Without parentheses it does work (i.e. works like a charm).
You can try in tinker with and without the parentheses to see the difference.

okay thanks, fixed with release 1.3.2

Thanks Sarfaz!
And once again thanks for the great library.