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=78064b92135426be4b2795fafc68ac60a99308fa;p=evergreen%2Ftadl.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 4ff0a1a657..1e86db6853 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