Is it alright to suppress/hide PHP notices?

后端 未结 4 367
-上瘾入骨i
-上瘾入骨i 2020-12-30 01:27

I\'ve suppressed notices for quite some time with no problems whatsoever but I am beginning to wonder if I\'m doing the right thing. I can\'t seem to find any logical reason

4条回答
  •  孤城傲影
    2020-12-30 01:40

    Suppose that you have a notice that you shouldn't ignore. This notice will be hidden into all notices that you usually ignore.

    IMHO, warnings should not be ignored. You should always take care of warnings to prevent bug. Every time I have a notice in my log file, I treat it like a bug.

    Also, if your site is accessed by a lot of user, you'll get a very big log file.

提交回复
热议问题