php warning explode() expects parameter 2 to be a string

372 views
Skip to first unread message

jglo

unread,
Mar 13, 2010, 2:23:29 AM3/13/10
to dompdf
Hi,
Using php 5.3.2, dompdf 0.6.0 dompdf works fine, but I get the
following php warnings:

Warning: explode() expects parameter 2 to be string, array given in C:
\...dompdf\include\style.cls.php on line 1058

Warning: explode(): It is not safe to rely on the system's timezone
settings. Yo
u are *required* to use the date.timezone setting or the
date_default_timezone_s
et() function. In case you used any of those methods and you are still
getting t
his warning, you most likely misspelled the timezone identifier. We
selected 'Eu
rope/Paris' for '1.0/no DST' instead in C:\...dompdf\include
\style.cls.php on line 1058

html and embedded css looks ok. What might by wrong?

BrianS

unread,
Mar 15, 2010, 4:53:10 PM3/15/10
to dompdf

I doubt there is a problem with your document, it's most likely DOMPDF
not handling something correctly. Can you post a sample document that
exhibits the error so we can investigate?

jglo

unread,
Mar 16, 2010, 8:36:44 AM3/16/10
to dompdf
Hi BrianS,

thanks for your hint. I reduced the problem to a few lines of html:

<head>
<link href="file:///home/projects/rails/osteodb-v2/public/
stylesheets/dompdf_test.css" rel="stylesheet" type="text/css" />
</head>
<body bgcolor="#FFFFFFF">
<p>Hello World!</p>
<table>
<tr class="streifengelb2">
<td>Cell</td>
</tr>
</table>
</body>


with the above stylesheet containing only:

.streifengelb2 {
background: green;
}

(I need colored rows in the table).

Hope that helps...

BrianS

unread,
Mar 16, 2010, 2:26:26 PM3/16/10
to dompdf

That's a great test case, thanks! This definitely appears to be a bug
in DOMPDF. You can work around the problem by using background-color
instead of background.
-b

Reply all
Reply to author
Forward
0 new messages