bug #4628 PHP error while exporting schema as PDF

Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>