Check for empty text strings. Thanks to Quedoc.

This commit is contained in:
thepurpleblob
2007-03-21 11:13:48 +00:00
parent e6b8565063
commit 6282be2fd9
+4
View File
@@ -71,6 +71,10 @@ class qformat_xml extends qformat_default {
* @return string processed text
*/
function import_text( $text ) {
// quick sanity check
if (empty($text)) {
return '';
}
$data = $text[0]['#'];
return addslashes(trim( $data ));
}