Skip to content
Permalink
Browse files

Fixing another `each()` use.

  • Loading branch information
oppiansteve committed Dec 30, 2019
1 parent 8bb6a17 commit e3a70811083fddebef89c861d60aedc62918ec90
Showing with 7 additions and 6 deletions.
  1. +7 −6 syndicatedpost.class.php
@@ -2199,13 +2199,14 @@ function author_id ($unfamiliar_author = 'create') {
// or forbidden names.

$author = NULL;
while (is_null($author) and ($candidate = each($candidates))) :
if (!is_null($candidate['value'])
and (strlen(trim($candidate['value'])) > 0)
and !in_array(strtolower(trim($candidate['value'])), $forbidden)) :
$author = $candidate['value'];
foreach ($candidates as $candidate) {
if (!is_null($candidate)
and (strlen(trim($candidate)) > 0)
and !in_array(strtolower(trim($candidate)), $forbidden)) :
$author = $candidate;
break;
endif;
endwhile;
}

$email = (isset($a['email']) ? $a['email'] : NULL);
$authorUrl = (isset($a['uri']) ? $a['uri'] : NULL);

0 comments on commit e3a7081

Please sign in to comment.
You can’t perform that action at this time.