From e6c6a4f61943a9486acc3e2a68f809f2956adfa2 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sun, 15 Oct 2006 17:47:37 +0000 Subject: Attempt to fix these errors when squid has not been configured: Warning: in_array(): Wrong datatype for second argument in /usr/local/pkg/squid.inc on line 532 Warning: in_array(): Wrong datatype for second argument in /usr/local/pkg/squid.inc on line 532 Warning: in_array(): Wrong datatype for second argument in /usr/local/pkg/squid.inc on line 83 Warning: in_array(): Wrong datatype for second argument in /usr/local/pkg/squid.inc on line 83 Warning: in_array(): Wrong datatype for second argument in /usr/local/pkg/squid.inc on line 83 Warning: in_array(): Wrong datatype for second argument in /usr/local/pkg/squid.inc on line 83 Warning: in_array(): Wrong datatype for second argument in /usr/local/pkg/squid.inc on line 83 Warning: in_array(): Wrong datatype for second argument in /usr/local/pkg/squid.inc on line 83 Warning: in_array(): Wrong datatype for second argument in /usr/local/pkg/squid.inc on line 83 Warning: in_array(): Wrong datatype for second argument in /usr/local/pkg/squid.inc on line 83 --- packages/squid.inc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'packages') diff --git a/packages/squid.inc b/packages/squid.inc index b2514ff4..5a934b1a 100644 --- a/packages/squid.inc +++ b/packages/squid.inc @@ -79,7 +79,10 @@ function squid_chown_recursive($dir, $user, $group) { function squid_is_valid_acl($acl) { global $valid_acls; - + if(!is_array($valid_acls)) + return; + if(!is_array($acl)) + return; return in_array($acl, $valid_acls); } @@ -498,7 +501,8 @@ EOD; function squid_resync_traffic() { global $config, $valid_acls; - + if(!is_array($valid_acls)) + return; $settings = $config['installedpackages']['squidtraffic']['config'][0]; $conf = ''; -- cgit v1.2.3