Hello I'm wondering what need there is for such @-statements. I consider thoose as a very bad practise, that should be avoided as much as possible. There is many case where using "@" will cause debugging headaches, and it's often used only because the developper is lazy and don't want to handle non-fatal errors.
The major problem is when the non-fatal error become an unpredicted fatal error for whatever reason. PHP then nicely hide it and ruins your day by the way. Remember that hiding and avoiding warnings/notices is not at all the same thing. I agree there is a very few case in which the use of @-statements is required, often because of poorly written builtins/extensions of PHP, but that's really a rare case and their use should be strictly limitted to that, imho. Seeing more and more places in symfony where @-statements appears i'm starting to see red elephpants as warnings... (111 code lines starts by '@' and 107 contains "something = @...", some lines may have escaped my net. If I exclude core plugins, I count still 43 + 29 which is better but still far from perfect) Best regards, Romain On Wed, Mar 25, 2009 at 4:28 PM, Fabian Lange < [email protected]> wrote: > Hi, > > it seems that for any unkown reason fopen from the sfFileCache fails: > $fp = @fopen($path.$file, "rb"); > > if you remove te @ and make it: > $fp = fopen($path.$file, "rb"); > > you sould be able to see the warning and we might find a way to improve the > behaviour. > This does not cause much harm because symfony will just not use the cached > file for handling your current request. > > Fabian -- Romain Dorgueil symfony core team developer http://dakrazy.net/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en -~----------~----~----~----~------~----~------~--~---
