From d7c9c0d4c321d5c1020a245b9090df758061d8dc Mon Sep 17 00:00:00 2001 From: pdontthink Date: Tue, 29 Jan 2008 23:09:43 +0000 Subject: [PATCH] Avoid E_STRICT errors git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12901 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/attachment_common.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/functions/attachment_common.php b/functions/attachment_common.php index 379572ad..09fc519d 100644 --- a/functions/attachment_common.php +++ b/functions/attachment_common.php @@ -248,6 +248,7 @@ function attachment_common_link_vcard(&$Args) { function attachment_common_octet_stream(&$Args) { global $FileExtensionToMimeType, $null; +//FIXME: I propose removing this hook; I don't like having two hooks close together, but moreover, this hook appears to merely give plugins the chance to add to the global $FileExtensionToMimeType variable, which they can do in any hook before now - I'd recommend prefs_backend (which is what config_override used to be) because it's the one hook run at the beginning of almost all page requests in init.php -- the con is that we don't need it run on ALL page requests, do we? There may be another hook in THIS page request that we can recommend, in which case, we *really should* remove this hook here. do_hook('attachment_common-load_mime_types', $null); ereg('\\.([^\\.]+)$', $Args[6], $Regs); @@ -257,8 +258,8 @@ function attachment_common_octet_stream(&$Args) { if ($Ext == '' || ! isset($FileExtensionToMimeType[$Ext])) return; - do_hook('attachment ' . $FileExtensionToMimeType[$Ext], - $temp=array(&$Args[0], &$Args[1], &$Args[2], &$Args[3], &$Args[4], &$Args[5], - &$Args[6], &$Args[7], &$Args[8])); + $temp=array(&$Args[0], &$Args[1], &$Args[2], &$Args[3], &$Args[4], &$Args[5], + &$Args[6], &$Args[7], &$Args[8]); + do_hook('attachment ' . $FileExtensionToMimeType[$Ext], $temp); } -- 2.25.1