svn: SVNROOT/ commit-bugs.php

[email protected] (Gwynne Raskind) Wed, 22 Jul 2009 01:16:33 +0000
Newsgroups php.cvs,svn.migration
Message-ID <[email protected]>
--f758591add4b853f3c70a8ac17de9dd29f4985d0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

gwynne                                   Wed, 22 Jul 2009 01:16:33 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=284572

Log:
ws, cs, and fixing Rasmus' substr() bug

Changed paths:
    U   SVNROOT/commit-bugs.php

Modified: SVNROOT/commit-bugs.php
===================================================================
--- SVNROOT/commit-bugs.php	2009-07-22 00:58:57 UTC (rev 284571)
+++ SVNROOT/commit-bugs.php	2009-07-22 01:16:33 UTC (rev 284572)
@@ -24,11 +24,16 @@

 // -----------------------------------------------------------------------------------------------------------------------------
 // Pick the default bug project out the of the path in the first changed dir
-switch (substr(trim($commit_info['dirs_changed'][0]),4)) {
-    case 'pear': $bug_project_default = 'pear'; break;
-    case 'pecl': $bug_project_default = 'pecl'; break;
-    default:     $bug_project_default = '';
-}
+switch (substr($commit_info['dirs_changed'][0], 0, 4)) {
+    case 'pear':
+        $bug_project_default = 'pear';
+        break;
+    case 'pecl':
+        $bug_project_default = 'pecl';
+        break;
+    default:
+        $bug_project_default = '';
+}

 // -----------------------------------------------------------------------------------------------------------------------------
 // Process the matches
@@ -48,7 +53,7 @@
 // -----------------------------------------------------------------------------------------------------------------------------
 // Make an RPC call for each bug
 include __DIR__ . '/secret.inc';
-foreach ($bug_list as $k=>$bug) {
+foreach ($bug_list as $k => $bug) {
     // Only do this for core PHP bugs
     if ($bug['project'] !== '') {
         continue;

--f758591add4b853f3c70a8ac17de9dd29f4985d0--