From dbaabcc635edf375779422561942e33d5231a137 Mon Sep 17 00:00:00 2001 From: Hannes Magnusson Date: Sun, 11 Feb 2007 14:23:02 +0000 Subject: [PATCH] Get rid of empty(trim()) Fix vim modeline to expand-tabs-to-spaces --- submit-event.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/submit-event.php b/submit-event.php index b6ea42f03..94ed58a01 100644 --- a/submit-event.php +++ b/submit-event.php @@ -59,10 +59,11 @@ if ($process) { $pu = parse_url($_POST['url']); $_POST['url'] = trim($_POST['url']); + $pu['host'] = trim($pu['host']); if (!$_POST['url']) { $errors[] = "You must supply a URL with more information about the event."; } - elseif (!in_array($pu['scheme'], $valid_schemes) || empty(trim($pu['host']))) { + elseif (!in_array($pu['scheme'], $valid_schemes) || empty($pu['host'])) { $errors[] = "The URL you supplied was invalid."; } @@ -253,5 +254,5 @@ function display_options($options, $current) } } -/* vim: set noet ts=4 sw=4 ft=php: : */ +/* vim: set et ts=4 sw=4 ft=php: : */ ?>