Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007720TestLinkInternal issuepublic2016-10-24 10:332019-01-19 15:14
Reportermodir 
Assigned Tofman 
PrioritylowSeverityminorReproducibilityalways
StatusclosedResolutionunable to reproduce 
PlatformOSOS Version
Product Version1.9.14 (2015 Q3) 
Fixed in Version 
Summary0007720: PHP Warning in logger class
DescriptionIn the logs I get very often this error message:

PHP Warning: Invalid argument supplied for foreach() in /testlink/lib/functions/logger.class.php on line 201

It looks to me like the variable is not always an array and you should check first if it really is one.

BTW: I have seen here an issue about refactoring the logger class. I am not sure what your plans are. Before you do too much work I would recommend you to look at https://github.com/Seldaek/monolog [^] many large PHP projects use these days monolog. It might be a good solution for you as well.
TagsNo tags attached.
Database (MySQL,Postgres,etc)mysql
Browser
PHP Version
TestCaseID
QA Team - Task Workflow StatusTBD
Attached Files

- Relationships

-  Notes
(0025714)
fman (administrator)
2016-12-11 16:16
edited on: 2016-12-11 16:31

Would you mind to try with

https://github.com/TestLinkOpenSourceTRMS/testlink-code/commit/93793fbe7f4fbb395bbabe570576b6d68bea0445 [^]

and provide feedback?

I've added an extra check, and I'm not able to reproduce on latest code.
Code for logger.class.php seems to be same that 1.9.15 with some checks to avoid to loop over a thing that is not an array.
regards

(0028451)
fman (administrator)
2019-01-19 15:14

no more user feedback

- Issue History
Date Modified Username Field Change
2016-10-24 10:33 modir New Issue
2016-12-11 16:16 fman Note Added: 0025714
2016-12-11 16:31 fman Note Edited: 0025714 View Revisions
2016-12-11 16:31 fman Note View State: 0025714: public
2016-12-11 16:31 fman Assigned To => fman
2016-12-11 16:31 fman Status new => feedback
2019-01-19 15:14 fman QA Team - Task Workflow Status => TBD
2019-01-19 15:14 fman Note Added: 0028451
2019-01-19 15:14 fman Status feedback => closed
2019-01-19 15:14 fman Resolution open => unable to reproduce



Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker