diff --git a/classes/components/forms/site/SiteConfigForm.inc.php b/classes/components/forms/site/SiteConfigForm.inc.php index d1786b44859..d01def59336 100644 --- a/classes/components/forms/site/SiteConfigForm.inc.php +++ b/classes/components/forms/site/SiteConfigForm.inc.php @@ -46,7 +46,7 @@ public function __construct($action, $locales, $site) { 'value' => $site->getData('title'), ])); - if ($result->valid()) { + if (count($result)) { $options = [['value' => '', 'label' => '']]; foreach ($result as $context) { $options[] = [ diff --git a/pages/article/ArticleHandler.inc.php b/pages/article/ArticleHandler.inc.php index 0b958144f7d..2a643dba11b 100644 --- a/pages/article/ArticleHandler.inc.php +++ b/pages/article/ArticleHandler.inc.php @@ -67,7 +67,7 @@ function initialize($request, $args = array()) { 'publisherIds' => $urlPath, ]); $publicationWithMatchingUrl = null; - if ($result->valid()) { + if (count($result)) { $publicationWithMatchingUrl = $result->current(); $submissionId = $publicationWithMatchingUrl->getData('submissionId'); } elseif (ctype_digit($urlPath)) {