[aur-dev] [PATCH 5/5] voters.php: Do not re-include libraries

Lukas Fleischer archlinux at cryptocrack.de
Wed Jul 18 02:09:32 EDT 2012


Use include_once() instead of include(). Otherwise, a fatal error is
shown if the virtual path feature is used since "web/lib/aur.inc.php" is
already included in the routing front end.

Signed-off-by: Lukas Fleischer <archlinux at cryptocrack.de>
---
 web/html/voters.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/web/html/voters.php b/web/html/voters.php
index 3ba5248..c7c59a2 100644
--- a/web/html/voters.php
+++ b/web/html/voters.php
@@ -1,7 +1,7 @@
 <?php
 set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
-include('aur.inc.php');
-include('pkgfuncs.inc.php');
+include_once('aur.inc.php');
+include_once('pkgfuncs.inc.php');
 
 $SID = $_COOKIE['AURSID'];
 
-- 
1.7.11.2



More information about the aur-dev mailing list