Skip to content

Commit

Permalink
Check if string contains an integer
Browse files Browse the repository at this point in the history
  • Loading branch information
leedxw committed Jan 8, 2025
1 parent f61a2e7 commit 7acd5b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/set-archive-author.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ function set_archive_author($data, $postarr)
return $data;
}

$archive_username = get_option('archive_author');
$archive_author = get_option('archive_author');

if (!empty($archive_author)) {
if (is_int($archive_author)) {
if ((string)(int)$archive_author == (string)$archive_author) {
$archive_author_id = $archive_author;
} else {
$archive_author_id = get_user_by('id', $archive_author);
Expand Down

0 comments on commit 7acd5b4

Please sign in to comment.