Skip to content

Commit

Permalink
Added strlen() check.
Browse files Browse the repository at this point in the history
  • Loading branch information
mjordan committed Oct 25, 2017
1 parent a298459 commit c8dd378
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function drush_islandora_doi_datacite_assign_dois_preflight() {
// can't rely on it here.
$dois = module_invoke_all('islandora_doi_framework_check_for_doi', $pid);
$dois = array_unique($dois);
if (count($dois)) {
if (count($dois) && strlen($dois[0])) {
$dois = array_unique($dois);
// Put any non-boolean values at beginning of array.
rsort($dois);
Expand Down Expand Up @@ -131,7 +131,7 @@ function drush_islandora_doi_datacite_assign_dois() {
// can't rely on it here.
$dois = module_invoke_all('islandora_doi_framework_check_for_doi', $pid);
$dois = array_unique($dois);
if (count($dois)) {
if (count($dois) && strlen($dois[0])) {
$dois = array_unique($dois);
// Put any non-boolean values at beginning of array.
rsort($dois);
Expand Down

0 comments on commit c8dd378

Please sign in to comment.