]> git.pld-linux.org Git - packages/rpm.git/blobdiff - rpm-php-requires.php
- avoid deadloops with preg_match
[packages/rpm.git] / rpm-php-requires.php
index 7b3c536c564af5fc45787d43a7e71870acd3499b..0e21d6763aa91e8a3ae4ef5be4be0f8affb4a202 100644 (file)
@@ -43,7 +43,7 @@ function peardeps($files) {
                                continue;
                        }
 
-                       while (preg_match("/(\W|^)(require|include)(_once)?
+                       if (preg_match("/(\W|^)(require|include)(_once)?
                                        \s* \(? \s*
                                        (\"([^\"]*)\"|'([^']*)')
                                        \s* \)? \s* ;/x", $line, $m)) {
@@ -71,7 +71,7 @@ function peardeps($files) {
                                continue;
                        }
 
-                       while (preg_match("/(\W|^)(require|include)(_once)?
+                       if (preg_match("/(\W|^)(require|include)(_once)?
                                        \s* \(? \s* dirname \s* \( \s* __FILE__ \s* \) \s* \. \s*
                                        (\"([^\"]*)\"|'([^']*)')
                                        \s* \)? \s* ;/x", $line, $m)) {
This page took 0.023594 seconds and 4 git commands to generate.