-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I've just found two PHP scripts that contain code like this:
$x = fopen(...);
while (!feof($x)) {
...
}
This is unfortunate, because it creates an infinite loop when fopen
fails: since $x is not a file handle, feof() will never return true, and
the loop will never end.
This is particularly serious with PHP because the infinite loop creates
a log message every time, which fills the system disk, but it's
something to be avoided in any language.
Error handling is not just a nicety. Doing it wrong creates serious
bugs. Do it right.
- river.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (HP-UX)
iEYEARECAAYFAkv0ghgACgkQIXd7fCuc5vLhUQCfbEzTLZQtNgOHEVf2k1aOqWkK
IyoAn07rhNNnHIGvIhTGsZyiogksMlow
=Ot4F
-----END PGP SIGNATURE-----
_______________________________________________
Toolserver-l mailing list ([email protected])
https://lists.wikimedia.org/mailman/listinfo/toolserver-l
Posting guidelines for this list:
https://wiki.toolserver.org/view/Mailing_list_etiquette