Don't try to import a <dd> without a <dt> from delicious

This commit is contained in:
Evan Prodromou 2011-03-31 16:15:30 -04:00
parent f580147058
commit d5a38c62f4

View File

@ -79,6 +79,12 @@ class DeliciousBackupImporter extends QueueHandler
$doc = $this->importHTML($body);
// If we can't parse it, it's no good
if (empty($doc)) {
return true;
}
$dls = $doc->getElementsByTagName('dl');
if ($dls->length != 1) {
@ -112,9 +118,11 @@ class DeliciousBackupImporter extends QueueHandler
case 'dd':
$dd = $child;
if (!empty($dt)) {
// This <dd> contains a description for the bookmark in
// the preceding <dt> node.
$saved = $this->importBookmark($user, $dt, $dd);
}
$dt = null;
$dd = null;