From cc5d55d5c33fbad2da55c2ab0cfa1de3f6f1dda9 Mon Sep 17 00:00:00 2001 From: swiergot Date: Fri, 5 Aug 2005 19:32:28 +0000 Subject: fixed a small bug in the package submitting code that caused real error message being overwritten by unreal URL parsing error --- web/html/pkgsubmit.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'web/html/pkgsubmit.php') diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php index e5498c4..e160571 100644 --- a/web/html/pkgsubmit.php +++ b/web/html/pkgsubmit.php @@ -295,9 +295,11 @@ if ($_COOKIE["AURSID"]) { # Check for http:// or other protocol in url # - $parsed_url = parse_url($pkgbuild['url']); - if (!$parsed_url['scheme']) { - $error = __("Package URL is missing a protocol (ie. http:// ,ftp://)"); + if (!error) { + $parsed_url = parse_url($pkgbuild['url']); + if (!$parsed_url['scheme']) { + $error = __("Package URL is missing a protocol (ie. http:// ,ftp://)"); + } } # Now, run through the pkgbuild array and do any $pkgname/$pkgver -- cgit v1.2.3-54-g00ecf