From: Galen Charlton Date: Thu, 19 Feb 2015 15:59:33 +0000 (+0000) Subject: LP#1418772: (follow-up) tweak undef-edness check X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=7b95863d9ad82224eb08ad4d64361adaaf351202;p=Evergreen.git LP#1418772: (follow-up) tweak undef-edness check Use the Perl defined() function rather than "eq undef" to avoid logging warnings about undefined values. Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm index 942c0aeefd..a9466b760a 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm @@ -196,7 +196,7 @@ sub init_ro_object_cache { my $date = shift; # Calling parse_datetime() with empty $date will lead to Internal Server Error - return '' if ($date eq '' or $date eq undef); + return '' if (!defined($date) or $date eq ''); # Probably an accidental entry like '0212' instead of '2012', # but 1) the leading 0 may get stripped in cstore and