If this is your first visit, check our documentation. To post, register or login.
Forums / Business Issues / Other Business Topics / Excessive PHP warnings

Excessive PHP warnings

Started by lordzoabar on 2 Jan 2018, 8:18 PM · Views: 229

Results 21 to 21 of 21
5 Jan 2018, 6:00 PM
#21
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Excessive PHP warnings

Lordzoabar:

Ok, fair enough. I got this position in the company, because out of everyone here, I'm the most technically inclined. That said, I am still very much a noob when it comes to PHP (and programming languages in general). I know just enough to be dangerous on my own, and, if told whats causing what, to be able to track it down and somewhat figure it out, and everything I DO know has more or less been through trial and error. If you're saying that there isn't anything to actually worry about, then I'll take that as it is. We WOULD like to get the site running at a higher level of PHP, if only for optimization purposes, but if it's working for the moment, then that's good enough.
I wouldn't necessarily go that far (meaning I won't sit over here and just say, ah yeah don't worry about anything it's all good. Without more information.) IT requires constant updates and review. Yes, it is important to first have things running, then to further consider the little issues. Left unchecked, your logs directory is going to fill up with all of those cautions, warnings, notices, etc... this will also dilute the importance of such messages. (ehh, just another one of the hundreds). As it seems difficult to review the log messages not having any kind of visual break, may I suggest editing both the catalog and admin side files stored at: includes/extra_configures/enable_error_logging.php
Somewhere around/shortly after line 29

And changing:

$backtrace = trim(preg_replace ('/^#0\s+' . __FUNCTION__ . "[^\n]*\n/", '', $backtrace, 1));

Back to:

$backtrace = preg_replace ('/^#0\s+' . __FUNCTION__ . "[^\n]*\n/", '', $backtrace, 1);

By removing the word trim, the left parentheses that follows it immediately and the closing parenthesis at the end. (or could just remove the word trim, but there is some expectation that the value would become a boolean true/false rather than contain the text that is expected. This modification would restore an empty line gap between the primary location of the error and what the actual error/message is. The next line after that will start the next issue. So: text, gap, first half of text relates to the first "report", the second reported data is the second half of that text, a gap and the first "half" of the next paragraph or if the last item in the log the entire last paragraph.

So, should those things be addressed/corrected? Any message of any issue should at least be evaluated. Not generating logs makes it easier to identify when something is amuck because one does get generated. That is not to say that the logs should be prevented from being generated (solution by some whether accidental or on purpose), they provide useful information to resolve an issue of some type the problem causing their generation should be addressed.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...