mirror of
https://github.com/Chouchen/ShikiryuRSS.git
synced 2026-11-17 01:01:18 +01:00
🚧 Add some validations and corrections
This commit is contained in:
1 parent
5de5993e2b
commit
f1816dec0c
10 files changed
+48
-26
No files matched your search
+10
-7
@@ -39,7 +39,6 @@ class SRSS implements Iterator
|
||||
|
||||
/**
|
||||
* @return SRSS
|
||||
* @throws \DOMException
|
||||
*/
|
||||
public static function create()
|
||||
{
|
||||
@@ -57,14 +56,18 @@ class SRSS implements Iterator
|
||||
*/
|
||||
public function isValid(): bool
|
||||
{
|
||||
$valid = true;
|
||||
foreach ($this->getItems() as $item) {
|
||||
if ($item->isValid() === false) {
|
||||
$valid = false;
|
||||
try {
|
||||
$valid = true;
|
||||
foreach ($this->getItems() as $item) {
|
||||
if ($item->isValid() === false) {
|
||||
$valid = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ($valid && $this->channel->isValid());
|
||||
return ($valid && $this->channel->isValid());
|
||||
} catch (\ReflectionException $e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user