Check for empty text strings. Thanks to Quedoc.

This commit is contained in:
thepurpleblob
2007-03-21 11:17:38 +00:00
parent aff7b7bd00
commit db3f7a489c
+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 ));
}