Commit 4fc68cd3 authored by Liam Morland's avatar Liam Morland Committed by Liam Morland
Browse files

Issue #3263430: Prevent conversion of FALSE to array

Retain returning FALSE when these are empty.
parent 32d23573
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -641,8 +641,8 @@ function _grabFirstnameInitials($remainder) {
 */
function _grabSurname($input) {
  $no_prefix = FALSE;
  $surname = FALSE;
  $prefix = FALSE;
  $surname = [];
  $prefix = [];

  $surname_array = explode(" ", $input);

@@ -659,9 +659,15 @@ function _grabSurname($input) {
  if (!empty($surname)) {
    $surname = implode(" ", $surname);
  }
  else {
    $surname = FALSE;
  }
  if (!empty($prefix)) {
    $prefix = implode(" ", $prefix);
  }
  else {
    $prefix = FALSE;
  }
  return array($surname, $prefix);
}