Anonymous Login
2022-12-06 10:11 PST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001023v3.0 Release[All Projects] Generalpublic2013-08-28 11:22
Assigned Tocaseydk 
Product Version 
Target VersionFixed in Version3.0.0 
Summary0001023: bug explanation & solution

Pacek wrote:
I have problem with "Print to PDF" function. When I press button I have error which is displayed at the bottom of Gantt chart:
JpGraph Error General PHP error : Undefined variable: criticalTasks

Could you help me resolve this error?

After installing XAMPP for Win on my local VISTA maschine I got the same error and the Gantt-chart is not generated.

The same web2project installed before by a free hoster did never get such an error message.

A sign that some hardware and /or software setup have an impact to the correct operation of the SW.

After some debuging I figured out that it can be circumvented by setting:

copy from my php.ini:

; Store the last error/warning message in $php_errormsg (boolean). Setting this value
; to On can assist in debugging and is appropriate for development servers. It should
; however be disabled on production servers.
; Default Value: Off
; Development Value: On
; Production Value: Off

track_errors = Off

As the standard setting was "on" the switch off removes the error.

The error comes from a php-error handling routine in "jpgraph.php" and
is catched by the php error message 'php_errormsg', that reports an "unknown string local_char_set".

//Check if there were any warnings, perhaps some wrong includes by the user
if( isset($GLOBALS['php_errormsg']) && CATCH_PHPERRMSG &&
!preg_match('|Deprecated|', $GLOBALS['php_errormsg']) && !preg_match('|deprecated|', $GLOBALS['php_errormsg']) && !preg_match('|Non-static|', $GLOBALS['php_errormsg'])) {

Why this php-error is generated I dont know... A task for the experts. With track_errors=off the php-error is not anymore reported and 'php_errormsg' becomes "NULL", so the php-error is not handled

this code:


gives the text-message:

JpGraph Error General PHP error : Undefined variable: criticalTasks.

Interesting to see, that 2 different installations with a mini-change in the php.ini can give completely different results.

The best solution would to keep the error tracking on and to figure out why the php-error occurs, otherwise it is only a dirty solution.
Additional Informationall versions as bug/error-handling in "jpgraph.php" depend on settings of php.ini
TagsNo tags attached.
Attached Files




caseydk (administrator)

Resolved in r2263;

-Issue History
Date Modified Username Field Change
2011-11-30 04:33 project_manager New Issue
2011-12-22 21:04 caseydk Note Added: 0002362
2011-12-22 21:04 caseydk Status new => resolved
2011-12-22 21:04 caseydk Resolution open => fixed
2011-12-22 21:04 caseydk Assigned To => caseydk
2013-08-28 11:14 caseydk Fixed in Version => 3.0.0
2013-08-28 11:22 caseydk Status resolved => closed
+Issue History