From fcaf1cc32c8568a8749eb38a219b061144145449 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Thu, 19 Feb 2015 15:59:33 +0000 Subject: [PATCH] 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 --- Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.43.2