php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57408 Magic file detection broken
Submitted: 2006-11-29 15:41 UTC Modified: 2013-02-18 00:35 UTC
From: nathan at silverorange dot com Assigned:
Status: No Feedback Package: Fileinfo (PECL)
PHP Version: 5.2.0 RC4 OS: Fedora
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
45 - 31 = ?
Subscribe to this entry?

 
 [2006-11-29 15:41 UTC] nathan at silverorange dot com
Description:
------------
The configure macro to find the magic file does not stop searching when it finds a match.  There are two loops that need to be broken and the patch below fixes this.

Reproduce code:
---------------
--- config.m4.orig      2006-11-29 16:33:06.000000000 -0400
+++ config.m4   2006-11-29 16:22:05.000000000 -0400
@@ -54,7 +54,7 @@
     for j in $MAGIC_MIME_FILENAMES; do
       if test -f "$i/$j"; then
         PHP_DEFAULT_MAGIC_FILE="$i/$j"
-        break
+        break 2
       fi
     done
   done



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-08-02 10:48 UTC] mj@php.net
config.m4 has changed substantially since you reported this issue. Can you please try again, ideally using PHP 5.3.0alpha1 from http://downloads.php.net/johannes/?
 [2013-02-18 00:35 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 06 19:01:32 2024 UTC