-
-
Notifications
You must be signed in to change notification settings - Fork 88
Helpers ipMatch: arguments do not match when one is empty #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Warning seems good. Isn't it better to fix it in RequestFactory? |
|
It did trigger warning on travis, but on localhost, it just hang. For minutes it did nothing so I had to kill it. Yes, fixing RequestFactory is probably the next step, but this is a bigger problem imho. |
|
I do not understand you… |
|
I have probably something wrongly configured on localhost so instead of throwing warning, the function call just hangs and waits (more than few minutes) for response that is never returned. That's why I think fixing it just in the RequestFactory is wrong. It should be fixed on both places and I will push another commit with fix also for RequestFactory. |
|
👎 You should not expect |
|
@JanTvrdik exception is fine with me. Hanging on network call for minutes is definitely not fine with me.
Then why do we have frameworks that tell us what we did wrong? Shouldn't I just know? :P |
|
Honestly, I still don't understand this issue. Is it a PHP bug? Is it a RequestFactory bug? Or did you just shoot yourself in the foot and came here to cry? |
@JanTvrdik that's really great attitude that will definitely make people wanna contribute to Nette. Even if I did. Isn't it more of a reason to solve this case so nobody else has to encounter it? |
|
Yet you did not answer my question. I still don't understand this issue. I could have offered you an advice how to best solve this have I understand the problem. |
|
This PR means: place @ in code to pass my tests. Rejected. |
|
No, it does not. I'm trying to reproduce it in my code right now and fix it in RequestFactory. |
|
And wait >2 years till somebody fixes it? I will definitely report it to PHP (if I manage to reproduce it, which I'm having a trouble right now).
Does checking for empty (and not calling |
|
Nette is full of workarounds for problems that can be reproduced ;-) |
|
Nobody is pushing you to merge this right away. As I've said earlier, I'm trying to reproduce it. |
|
ipMatch returns FALSE and E_WARNING for invalid arguments, it is not the best, but good. Your first PR suppressed E_WARNING for some of invalid arguments (and for others not), your second PR escaled E_WARNING to exception for some of invalid arguments (and for others not). This is mess. |
Pull Request. |
|
Hele já už to anglicky nedávám... pojďme se prosím bavit konstruktivně a vynechat trolování a slovíčkaření... Od té doby co mi to na tom volání mrzlo jsem musel restartovat počítač a teď to nejsem schopnej zreprodukovat. To nic ale nemění na tom, že ta funkce furt hází ten warning což je pro mě problém. Současná situace: když pustím testy v cli (ať už přes Návrhy řešení:
|
|
E_WARNING is fine for me, but if you need exception, put |
|
ping @fprochazka |
When there is no ip-address in the
$_SERVER, the application hangs, because it tries to resolve empty string.