[PHP-CVS] com karma: add log for tag: lib/Git/PostReceiveHook.php
Commit:74122fc5eefce2404a13e7fc5a37067bb6106881 Author:Alexander Moskaliov Fri, 23 Mar 2012 10:51:23 +0400 Parents: 51d545a5ce6759e7b9afcaa410ef92a8bbe4a01a Branches: master Link: http://git.php.net/?p=karma.git;a=commitdiff;h=74122fc5eefce2404a13e7fc5a37067bb6106881 Log: add log for tag Changed paths: M lib/Git/PostReceiveHook.php Diff: 74122fc5eefce2404a13e7fc5a37067bb6106881 diff --git a/lib/Git/PostReceiveHook.php b/lib/Git/PostReceiveHook.php index b7f632d..eecc9cf 100644 --- a/lib/Git/PostReceiveHook.php +++ b/lib/Git/PostReceiveHook.php @@ -315,7 +315,8 @@ class PostReceiveHook extends ReceiveHook $mail->setFrom($this->pushAuthor . '@php.net', $this->pushAuthorName); $mail->addTo($this->mailingList); -$mail->send(); +$result = $mail->send(); +$this->log('tag ' . $name . ($result ? ' was send' : ' error while sending')); } /** -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com karma: fix "undefined info" bug: lib/Git/PostReceiveHook.php
Commit:51d545a5ce6759e7b9afcaa410ef92a8bbe4a01a Author:Alexander Moskaliov Fri, 23 Mar 2012 10:44:18 +0400 Parents: c32cd6bf135db5eda1f074f62130ec24957a98a7 Branches: master Link: http://git.php.net/?p=karma.git;a=commitdiff;h=51d545a5ce6759e7b9afcaa410ef92a8bbe4a01a Log: fix "undefined info" bug Changed paths: M lib/Git/PostReceiveHook.php Diff: 51d545a5ce6759e7b9afcaa410ef92a8bbe4a01a diff --git a/lib/Git/PostReceiveHook.php b/lib/Git/PostReceiveHook.php index 3b877b1..b7f632d 100644 --- a/lib/Git/PostReceiveHook.php +++ b/lib/Git/PostReceiveHook.php @@ -260,13 +260,13 @@ class PostReceiveHook extends ReceiveHook $shortname = str_replace('refs/tags/', '', $name); $mail = new \Mail(); $mail->setSubject($this->emailPrefix . 'tag ' . $this->getRepositoryShortName() . ': ' . $status[$changeType] . ' tag ' . $shortname); -$mail->setTimestamp(strtotime($info['tagger_date'])); $message = 'Tag ' . $shortname . ' in ' . $this->getRepositoryName() . ' was ' . $status[$changeType] . 'd' . (($changeType != self::TYPE_CREATED) ? ' from ' . $oldrev : '' ) . "\n"; if ($changeType != self::TYPE_DELETED) { $info = $this->getTagInfo($name); +$mail->setTimestamp(strtotime($info['tagger_date'])); $targetInfo = $this->getCommitInfo($info['target']); $targetPaths = $this->getChangedPaths(escapeshellarg($info['target'])); $pathsString = ''; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com karma: Small refactoring: lib/Git/PostReceiveHook.php
Commit:c32cd6bf135db5eda1f074f62130ec24957a98a7 Author:Alexander Moskaliov Fri, 23 Mar 2012 10:16:44 +0400 Parents: 00fd9038da096f1e283f85bab24e789bd84523af Branches: master Link: http://git.php.net/?p=karma.git;a=commitdiff;h=c32cd6bf135db5eda1f074f62130ec24957a98a7 Log: Small refactoring Changed paths: M lib/Git/PostReceiveHook.php c32cd6bf135db5eda1f074f62130ec24957a98a7 diff --git a/lib/Git/PostReceiveHook.php b/lib/Git/PostReceiveHook.php index 7a84f5f..3b877b1 100644 --- a/lib/Git/PostReceiveHook.php +++ b/lib/Git/PostReceiveHook.php @@ -16,8 +16,6 @@ class PostReceiveHook extends ReceiveHook private $allBranches = []; -private $branchesMailIds = []; - /** * @param string $basePath base path for all repositories * @param string $pushAuthor user who make push @@ -79,19 +77,17 @@ class PostReceiveHook extends ReceiveHook } $this->alreadyExistsBranches = array_diff($this->allBranches, $newBranches); -//send mails per ref push + foreach ($this->refs as $ref) { if ($ref['reftype'] == self::REF_TAG) { +// tag mail $this->sendTagMail($ref['refname'], $ref['changetype'], $ref['old'], $ref['new']); -} -} - -foreach($this->refs as $ref) { -// magic populate the $this->revisions -if ($ref['reftype'] == self::REF_BRANCH && $ref['changetype'] != self::TYPE_DELETED) { +} elseif ($ref['reftype'] == self::REF_BRANCH && $ref['changetype'] != self::TYPE_DELETED) { +// magic populate the $this->revisions $this->getBranchRevisions($ref['refname'], $ref['changetype'], $ref['old'], $ref['new']); } } + $this->log('Found revisions: '. implode(' ', array_keys($this->revisions))); //send mails per commit foreach ($this->revisions as $revision => $branches) { @@ -473,6 +469,7 @@ class PostReceiveHook extends ReceiveHook * Author: %USER% Thu, 08 Mar 2012 12:39:48 + * Committer: %USER% Thu, 08 Mar 2012 12:39:48 + * Parents: %SHA_PARENTS% + * Branches: %BRANCHES% * * Link: http://git.php.net/?p=%PROJECT_PATH%;a=commitdiff;h=%SHA% * @@ -497,80 +494,85 @@ class PostReceiveHook extends ReceiveHook private function sendCommitMail($revision, $branches) { -$bnames = array_map(function($x) { -return str_replace('refs/heads/', '', $x); -}, $branches); - -$info = $this->getCommitInfo($revision); $paths = $this->getChangedPaths(escapeshellarg($revision)); $pathsString = ''; foreach ($paths as $path => $action) { $pathsString .= ' ' . $action . ' ' . $path . "\n"; } -$diff = \Git::gitExec('diff-tree -c -p %s', escapeshellarg($revision)); -$mail = new \Mail(); -$mail->setSubject($this->emailPrefix . 'com ' . $this->getRepositoryShortName() . ': ' . $info['subject'] . ': '. implode(' ', array_keys($paths))); -$mail->setTimestamp(strtotime($info['author_date'])); +$isTrivialMerge = empty($pathsString); -$message = ''; +if (!$isTrivialMerge) { -$message .= 'Commit:' . $revision . "\n"; -$message .= 'Author:' . $info['author'] . ' <' . $info['author_email'] . '> ' . $info['author_date'] . "\n"; -if (($info['author'] != $info['committer']) || ($info['author_email'] != $info['committer_email'])) { -$message .= 'Committer: ' . $info['committer'] . ' <' . $info['committer_email'] . '> ' . $info['committer_date'] . "\n"; -} -if ($info['parents']) $message .= 'Parents: ' . $info['parents'] . "\n"; +$bnames = array_map( +function($x) { +return str_replace('refs/heads/', '', $x); +}, +$branches +); -$message .= "Branches: " . implode(' ', $bnames) . "\n"; -$message .= "\n" . "Link: http://git.php.net/?p="; . $this->getRepositoryName() . ";a=commitdiff;h=" . $revision . "\n"; +$info = $this->getCommitInfo($revision); -$message .= "\nLog:\n" . $info['log'] . "\n"; +$diff = \Git::gitExec('diff-tree -c -p %s', escapeshellarg($revision)); -if ($bugs = $this->getBugs($info['log'])) { -$message .= "\nBugs:\n" . implode("\n", $bugs) . "\n"; -} +$mail = new \Mail(); +$mail->setSubject($this->emailPrefix . 'com ' . $this->getRepositoryShortName() . ': ' . $info['subject'] . ': '. implode(' ', array_keys($paths))); +$mail->setTimestamp(strtotime($info['author_date'])); -$isTrivialMerge = empty($pathsString); +$message = ''; -
[PHP-CVS] com karma: Remove commit data cache.: lib/Git/PostReceiveHook.php
Commit:00fd9038da096f1e283f85bab24e789bd84523af Author:Alexander Moskaliov Fri, 23 Mar 2012 09:53:30 +0400 Parents: b6b01b9106a29aefe97dcab12c39501ff4ecdb69 Branches: master Link: http://git.php.net/?p=karma.git;a=commitdiff;h=00fd9038da096f1e283f85bab24e789bd84523af Log: Remove commit data cache. This cache was added because same commits data was used in branch,tag and commit mails. Now we remove branch mails, so we not need cache more. Changed paths: M lib/Git/PostReceiveHook.php Diff: 00fd9038da096f1e283f85bab24e789bd84523af diff --git a/lib/Git/PostReceiveHook.php b/lib/Git/PostReceiveHook.php index 11d3996..7a84f5f 100644 --- a/lib/Git/PostReceiveHook.php +++ b/lib/Git/PostReceiveHook.php @@ -13,7 +13,6 @@ class PostReceiveHook extends ReceiveHook private $alreadyExistsBranches = []; private $updatedBranches = []; private $revisions = []; -private $commitsData = []; private $allBranches = []; @@ -428,22 +427,20 @@ class PostReceiveHook extends ReceiveHook */ private function getCommitInfo($revision) { -if (!isset($this->commitsData[$revision])) { -$raw = \Git::gitExec('rev-list -n 1 --format="%%P%%n%%an%%n%%ae%%n%%aD%%n%%cn%%n%%ce%%n%%cD%%n%%s%%n%%B" %s', escapeshellarg($revision)); -$raw = explode("\n", trim($raw), 10); //10 elements separated by \n, last element - log message, first(skipped) element - "commit sha" -$this->commitsData[$revision] = [ -'parents' => $raw[1], // %P -'author'=> $raw[2], // %an -'author_email' => $raw[3], // %ae -'author_date' => $raw[4], // %aD -'committer' => $raw[5], // %cn -'committer_email' => $raw[6], // %ce -'committer_date'=> $raw[7], // %cD -'subject' => $raw[8], // %s -'log' => $raw[9] // %B -]; -} -return $this->commitsData[$revision]; +$raw = \Git::gitExec('rev-list -n 1 --format="%%P%%n%%an%%n%%ae%%n%%aD%%n%%cn%%n%%ce%%n%%cD%%n%%s%%n%%B" %s', escapeshellarg($revision)); +$raw = explode("\n", trim($raw), 10); //10 elements separated by \n, last element - log message, first(skipped) element - "commit sha" +$data = [ +'parents' => $raw[1], // %P +'author'=> $raw[2], // %an +'author_email' => $raw[3], // %ae +'author_date' => $raw[4], // %aD +'committer' => $raw[5], // %cn +'committer_email' => $raw[6], // %ce +'committer_date'=> $raw[7], // %cD +'subject' => $raw[8], // %s +'log' => $raw[9] // %B +]; +return $data; } /** -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] tag php-src: delete tag PHP-5.4.1-RC1
Tag PHP-5.4.1-RC1 in php-src.git was deleted from 21a74f2e57e416594a454764db0dcf6337eb3210 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: revert from NEWS too: NEWS
Commit:4990250f2d5bd3dad82e9d98d4b18c3091bf8843 Author:Stanislav Malyshev Thu, 22 Mar 2012 22:34:32 -0700 Parents: a89c4a34ee55686ab1430a5060e1460335fc5203 Branches: PHP-5.3 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4990250f2d5bd3dad82e9d98d4b18c3091bf8843 Log: revert from NEWS too Changed paths: M NEWS Diff: 4990250f2d5bd3dad82e9d98d4b18c3091bf8843 diff --git a/NEWS b/NEWS index ce48ba0..ecfa977 100644 --- a/NEWS +++ b/NEWS @@ -100,9 +100,6 @@ PHP NEWS - SPL . Fixed memory leak when calling SplFileInfo's constructor twice. (Felipe) - . Fixed bug #61418 (Segmentation fault when DirectoryIterator's or -FilesystemIterator's iterators are requested more than once without -having had its dtor callback called in between). (Gustavo) . Fixed bug #61347 (inconsistent isset behavior of Arrayobject). (Laruence) . Fixed bug #61326 (ArrayObject comparison). (Gustavo) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: update for git: README.RELEASE_PROCESS
Commit:ee755fafb99ba618fd82bbe05758ace68584ded1 Author:Stanislav Malyshev Thu, 22 Mar 2012 12:05:27 -0700 Parents: 22f4043a3813c9fbebe37bff2e876f2b85de01f0 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ee755fafb99ba618fd82bbe05758ace68584ded1 Log: update for git Changed paths: M README.RELEASE_PROCESS Diff: ee755fafb99ba618fd82bbe05758ace68584ded1 diff --git a/README.RELEASE_PROCESS b/README.RELEASE_PROCESS index 44f04dc..6a6da62 100644 --- a/README.RELEASE_PROCESS +++ b/README.RELEASE_PROCESS @@ -50,38 +50,30 @@ Rolling a non stable release (alpha/beta/RC) 2. run the "scripts/dev/credits" script in php-src and commit the changes in the credits files in ext/standard. -3. Bump the version numbers in ``main/php_version.h``, ``configure.in`` and possibly ``NEWS``. -Do not use abbreviations for alpha and beta. - -4. Commit those changes and note the revision id. - -5. tag the repository with the version. To do the tag in a fast way do a svn copy on the server using full URLs. You should use the revision id from the above commit to prevent mistakes in case there was a commit in between. f.e. "``svn cp https://svn.php.net/repository/php/php-src/branches/PHP_5_3@308399 https://svn.php.net/repository/php/php-src/tags/php_5_3_6RC1``"; -(of course, you need to change that to the version you're rolling an RC for). Mail php-internals to announce the tag so tests/validation/check can be done prior to package it. It is especially important for RCs. +3. Checkout the release branch for this release (e.g., PHP-5.4.2). -6. Bump up the version numbers in ``main/php_version.h``, ``configure.in`` -and possibly ``NEWS`` again, to the **next** version. F.e. if the release -candidate was "4.4.1RC1" then the new one should be "4.4.1RC2-dev" - regardless -if we get a new RC or not. This is to make sure ``version_compare()`` can -correctly work. +4. Bump the version numbers in ``main/php_version.h``, ``configure.in`` and possibly ``NEWS``. +Do not use abbreviations for alpha and beta. -7. Commit those changes +5. Commit these changes to the branch with ``git commit -a``. -8. Log in onto the snaps box and go into the correct tree (f.e. the PHP_4_4 -branch if you're rolling 4.4.x releases). +6. Tag the repository with the version, e.g.: +``git tag -u YOURKEYID PHP-5.4.2-RC2`` -9. You do not have to update the tree, but of course you can with "``svn up``". +7. Push the changes to the main repo: +``git push --tags origin HEAD`` -10. run: ``./makedist php 4.4.1RC1``, this will export the tree, create configure +8. run: ``./makedist 5.4.2-RC2``, this will export the tree, create configure and build two tarballs (one gz and one bz2). -11. Copy those two tarballs to www.php.net, in your homedir there should be a +9. Copy those two tarballs to www.php.net, in your homedir there should be a directory "downloads/". Copy them into there, so that the system can generate MD5 sums. If you do not have this directory, talk to Derick. -12. Now the RC can be found on http://downloads.php.net/yourname, +10. Now the RC can be found on http://downloads.php.net/yourname, f.e. http://downloads.php.net/derick/ -13. Once the release has been tagged, contact the PHP Windows development team +11. Once the release has been tagged, contact the PHP Windows development team (internals-...@lists.php.net) so that Windows binaries can be created. Once those are made, they should be placed into the same directory as the source snapshots. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Merge branch 'PHP-5.3' into PHP-5.4: ext/spl/spl_directory.c
Commit:bcc15b56331f3055c99d8c126a61f48b33229c1c Author:Stanislav Malyshev Thu, 22 Mar 2012 22:30:51 -0700 Parents: ee755fafb99ba618fd82bbe05758ace68584ded1 a89c4a34ee55686ab1430a5060e1460335fc5203 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=bcc15b56331f3055c99d8c126a61f48b33229c1c Log: Merge branch 'PHP-5.3' into PHP-5.4 * PHP-5.3: Revert "- Fixed bug #61418 (Segmentation fault when DirectoryIterator's or" - causes bug #61482 Add initialization tests for SQLT_INT binds Fix NEWS Bugs: https://bugs.php.net/61418 https://bugs.php.net/61482 Changed paths: MM ext/spl/spl_directory.c bcc15b56331f3055c99d8c126a61f48b33229c1c diff --combined ext/spl/spl_directory.c index c6eec94,f0e903f..22d4ffa --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@@ -120,16 -120,6 +120,6 @@@ static void spl_filesystem_object_free_ spl_filesystem_file_free_line(intern TSRMLS_CC); break; } - - { - zend_object_iterator *iterator; - iterator = (zend_object_iterator*) - spl_filesystem_object_to_iterator(intern); - if (iterator->data != NULL) { - iterator->data = NULL; - iterator->funcs->dtor(iterator TSRMLS_CC); - } - } efree(object); } /* }}} */ @@@ -148,6 -138,7 +138,6 @@@ static zend_object_value spl_filesystem { zend_object_value retval; spl_filesystem_object *intern; - zval *tmp; intern = emalloc(sizeof(spl_filesystem_object)); memset(intern, 0, sizeof(spl_filesystem_object)); @@@ -157,7 -148,7 +147,7 @@@ if (obj) *obj = intern; zend_object_std_init(&intern->std, class_type TSRMLS_CC); - zend_hash_copy(intern->std.properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *)); + object_properties_init(&intern->std, class_type); retval.handle = zend_objects_store_put(intern, (zend_objects_store_dtor_t) zend_objects_destroy_object, (zend_objects_free_object_storage_t) spl_filesystem_object_free_storage, NULL TSRMLS_CC); retval.handlers = &spl_filesystem_object_handlers; @@@ -244,7 -235,7 +234,7 @@@ static void spl_filesystem_dir_open(spl intern->type = SPL_FS_DIR; intern->_path_len = strlen(path); - intern->u.dir.dirp = php_stream_opendir(path, ENFORCE_SAFE_MODE|REPORT_ERRORS, NULL); + intern->u.dir.dirp = php_stream_opendir(path, REPORT_ERRORS, FG(default_context)); if (intern->_path_len > 1 && IS_SLASH_AT(path, intern->_path_len-1)) { intern->_path = estrndup(path, --intern->_path_len); @@@ -270,20 -261,9 +260,20 @@@ static int spl_filesystem_file_open(spl_filesystem_object *intern, int use_include_path, int silent TSRMLS_DC) /* {{{ */ { + zval tmp; + intern->type = SPL_FS_FILE; + + php_stat(intern->file_name, intern->file_name_len, FS_IS_DIR, &tmp TSRMLS_CC); + if (Z_LVAL(tmp)) { + intern->u.file.open_mode = NULL; + intern->file_name = NULL; + zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Cannot use SplFileObject with directories"); + return FAILURE; + } + intern->u.file.context = php_stream_context_from_zval(intern->u.file.zcontext, 0); - intern->u.file.stream = php_stream_open_wrapper_ex(intern->file_name, intern->u.file.open_mode, (use_include_path ? USE_PATH : 0) | ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL, intern->u.file.context); + intern->u.file.stream = php_stream_open_wrapper_ex(intern->file_name, intern->u.file.open_mode, (use_include_path ? USE_PATH : 0) | REPORT_ERRORS, NULL, intern->u.file.context); if (!intern->file_name_len || !intern->u.file.stream) { if (!EG(exception)) { @@@ -595,10 -575,6 +585,10 @@@ static HashTable* spl_filesystem_object *is_temp = 1; + if (!intern->std.properties) { + rebuild_object_properties(&intern->std); + } + ALLOC_HASHTABLE(rv); ZEND_INIT_SYMTABLE_EX(rv, zend_hash_num_elements(intern->std.properties) + 3, 0); @@@ -660,17 -636,16 +650,17 @@@ } /* }}} */ -zend_function *spl_filesystem_object_get_method_check(zval **object_ptr, char *method, int method_len TSRMLS_DC) /* {{{ */ +zend_function *spl_filesystem_object_get_method_check(zval **object_ptr, char *method, int method_len, const struct _zend_literal *key TSRMLS_DC) /* {{{ */ { spl_filesystem_object *fsobj = zend_object_store_get_object(*object_ptr TSRMLS_CC); if (fsobj->u.dir.entry.d_name[0] == '\0' && fsobj->orig_path == NULL) { method = "_bad_state_ex"; method_len = sizeof("_bad_state_ex") - 1; + key = NULL; } - return zend_get_s
[PHP-CVS] com php-src: Revert "- Fixed bug #61418 (Segmentation fault when DirectoryIterator's or" - causes bug #61482: ext/spl/spl_directory.c ext/spl/tests/bug61418.phpt
Commit:a89c4a34ee55686ab1430a5060e1460335fc5203 Author:Stanislav Malyshev Thu, 22 Mar 2012 22:29:50 -0700 Parents: 7164175e8576144562d9062c4625bcbaa4d670e2 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a89c4a34ee55686ab1430a5060e1460335fc5203 Log: Revert "- Fixed bug #61418 (Segmentation fault when DirectoryIterator's or" - causes bug #61482 This reverts commit 714f1ff4b37c5101b3c61ea108a3d415f41e50df. Bugs: https://bugs.php.net/61418 https://bugs.php.net/61482 Changed paths: M ext/spl/spl_directory.c D ext/spl/tests/bug61418.phpt Diff: a89c4a34ee55686ab1430a5060e1460335fc5203 diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index fb19823..f0e903f 100755 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -120,16 +120,6 @@ static void spl_filesystem_object_free_storage(void *object TSRMLS_DC) /* {{{ */ spl_filesystem_file_free_line(intern TSRMLS_CC); break; } - - { - zend_object_iterator *iterator; - iterator = (zend_object_iterator*) - spl_filesystem_object_to_iterator(intern); - if (iterator->data != NULL) { - iterator->data = NULL; - iterator->funcs->dtor(iterator TSRMLS_CC); - } - } efree(object); } /* }}} */ @@ -1637,15 +1627,10 @@ zend_object_iterator *spl_filesystem_dir_get_iterator(zend_class_entry *ce, zval dir_object = (spl_filesystem_object*)zend_object_store_get_object(object TSRMLS_CC); iterator = spl_filesystem_object_to_iterator(dir_object); - /* initialize iterator if it wasn't gotten before */ - if (iterator->intern.data == NULL) { - iterator->intern.data = object; - iterator->intern.funcs = &spl_filesystem_dir_it_funcs; - /* ->current must be initialized; rewind doesn't set it and valid -* doesn't check whether it's set */ - iterator->current = object; - } - zval_add_ref(&object); + Z_SET_REFCOUNT_P(object, Z_REFCOUNT_P(object) + 2); + iterator->intern.data = (void*)object; + iterator->intern.funcs = &spl_filesystem_dir_it_funcs; + iterator->current = object; return (zend_object_iterator*)iterator; } @@ -1724,15 +1709,15 @@ static void spl_filesystem_dir_it_rewind(zend_object_iterator *iter TSRMLS_DC) static void spl_filesystem_tree_it_dtor(zend_object_iterator *iter TSRMLS_DC) { spl_filesystem_iterator *iterator = (spl_filesystem_iterator *)iter; + zval *zfree = (zval*)iterator->intern.data; - if (iterator->intern.data) { - zval *object = iterator->intern.data; - zval_ptr_dtor(&object); - } else { - if (iterator->current) { - zval_ptr_dtor(&iterator->current); - } + if (iterator->current) { + zval_ptr_dtor(&iterator->current); } + iterator->intern.data = NULL; /* mark as unused */ + /* free twice as we add ref twice */ + zval_ptr_dtor(&zfree); + zval_ptr_dtor(&zfree); } /* }}} */ @@ -1843,12 +1828,10 @@ zend_object_iterator *spl_filesystem_tree_get_iterator(zend_class_entry *ce, zva dir_object = (spl_filesystem_object*)zend_object_store_get_object(object TSRMLS_CC); iterator = spl_filesystem_object_to_iterator(dir_object); - /* initialize iterator if wasn't gotten before */ - if (iterator->intern.data == NULL) { - iterator->intern.data = object; - iterator->intern.funcs = &spl_filesystem_tree_it_funcs; - } - zval_add_ref(&object); + Z_SET_REFCOUNT_P(object, Z_REFCOUNT_P(object) + 2); + iterator->intern.data = (void*)object; + iterator->intern.funcs = &spl_filesystem_tree_it_funcs; + iterator->current = NULL; return (zend_object_iterator*)iterator; } diff --git a/ext/spl/tests/bug61418.phpt b/ext/spl/tests/bug61418.phpt deleted file mode 100644 index c5d9db9..000 --- a/ext/spl/tests/bug61418.phpt +++ /dev/null @@ -1,23 +0,0 @@ ---TEST-- -Bug #61418: Segmentation fault using FiltesystemIterator & RegexIterator ---FILE-- - $file) -{ -} -unset($regexpIterator); -unset($fileIterator); - -$dirIterator = new DirectoryIterator(__DIR__); -$regexpIterator2 = new RegexIterator($dirIterator, '#.*#'); -foreach ($dirIterator as $key => $file) -{ -} -unset($regexpIterator2); -unset($dirIterator); -?> -==DONE== ---EXPECT-- -==DONE== -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: More changes to README: ext/oci8/README
Commit:f402ca23d3d9bebc53a81a787864f0b7e874d43b Author:Christopher Jones Thu, 22 Mar 2012 14:28:33 -0700 Parents: 7164175e8576144562d9062c4625bcbaa4d670e2 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f402ca23d3d9bebc53a81a787864f0b7e874d43b Log: More changes to README Changed paths: M ext/oci8/README Diff: f402ca23d3d9bebc53a81a787864f0b7e874d43b diff --git a/ext/oci8/README b/ext/oci8/README index db7db57..6ec2de7 100644 --- a/ext/oci8/README +++ b/ext/oci8/README @@ -8,5 +8,4 @@ with Oracle 10.2 libraries can connect to Oracle Database 9.2 onwards. This release of OCI8 can be used with PHP versions 4.3.9 to 5.x. -OCI8 installation instructions and documentation is available at -http://www.php.net/oci8 +OCI8 documentation is available at http://www.php.net/oci8 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Add initialization tests for SQLT_INT binds: ext/oci8/tests/bind_sqltint.phpt
Commit:fe5785d92b8b68843a4076ed7af5bf639ac15bc4 Author:Christopher Jones Wed, 21 Mar 2012 16:12:28 -0700 Parents: cb4e82a1cc16457da224dd045842583c69bfa00e Branches: PHP-5.4 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=fe5785d92b8b68843a4076ed7af5bf639ac15bc4 Log: Add initialization tests for SQLT_INT binds Added tests for SQLT_INT binds particularly to check for uninitialized variables. Changed paths: M ext/oci8/tests/bind_sqltint.phpt Diff: fe5785d92b8b68843a4076ed7af5bf639ac15bc4 diff --git a/ext/oci8/tests/bind_sqltint.phpt b/ext/oci8/tests/bind_sqltint.phpt index f01791d..ac8518e 100644 --- a/ext/oci8/tests/bind_sqltint.phpt +++ b/ext/oci8/tests/bind_sqltint.phpt @@ -123,6 +123,88 @@ oci_execute($s); check_col($c, 'number_t92', 150); +echo "\nTEST151 - 159 Initialization tests\n"; + +$s = oci_parse($c, "begin :p2 := :p1; end;"); +unset($p1); +unset($p2); +oci_bind_by_name($s, ":p1", $p1, 10); +oci_bind_by_name($s, ":p2", $p2, -1, SQLT_INT); +oci_execute($s); +var_dump($p2); + +echo "\nTEST152\n"; + +unset($p1); +$p2 = null; +oci_bind_by_name($s, ":p1", $p1, 10); +oci_bind_by_name($s, ":p2", $p2, -1, SQLT_INT); +oci_execute($s); +var_dump($p2); + +echo "\nTEST153\n"; + +unset($p1); +$p2 = ; +oci_bind_by_name($s, ":p1", $p1, 10); +oci_bind_by_name($s, ":p2", $p2, -1, SQLT_INT); +oci_execute($s); +var_dump($p2); + +echo "\nTEST154\n"; + +$p1 = null; +unset($p2); +oci_bind_by_name($s, ":p1", $p1, 10); +oci_bind_by_name($s, ":p2", $p2, -1, SQLT_INT); +oci_execute($s); +var_dump($p2); + +echo "\nTEST155\n"; + +$p1 = null; +$p2 = null; +oci_bind_by_name($s, ":p1", $p1, 10); +oci_bind_by_name($s, ":p2", $p2, -1, SQLT_INT); +oci_execute($s); +var_dump($p2); + +echo "\nTEST156\n"; + +$p1 = null; +$p2 = ; +oci_bind_by_name($s, ":p1", $p1, 10); +oci_bind_by_name($s, ":p2", $p2, -1, SQLT_INT); +oci_execute($s); +var_dump($p2); + +echo "\nTEST157\n"; + +$p1 = ; +unset($p2); +oci_bind_by_name($s, ":p1", $p1, 10); +oci_bind_by_name($s, ":p2", $p2, -1, SQLT_INT); +oci_execute($s); +var_dump($p2); + +echo "\nTEST158\n"; + +$p1 = ; +$p2 = null; +oci_bind_by_name($s, ":p1", $p1, 10); +oci_bind_by_name($s, ":p2", $p2, -1, SQLT_INT); +oci_execute($s); +var_dump($p2); + +echo "\nTEST159\n"; + +$p1 = ; +$p2 = ; +oci_bind_by_name($s, ":p1", $p1, 10); +oci_bind_by_name($s, ":p2", $p2, -1, SQLT_INT); +oci_execute($s); +var_dump($p2); + // Clean up $stmtarray = array( @@ -224,4 +306,31 @@ array(1) { string(1) "0" } } + +TEST151 - 159 Initialization tests +NULL + +TEST152 +NULL + +TEST153 +NULL + +TEST154 +NULL + +TEST155 +NULL + +TEST156 +NULL + +TEST157 +int() + +TEST158 +int() + +TEST159 +int() ===DONE=== -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Add initialization tests for SQLT_INT binds: ext/oci8/tests/bind_sqltint.phpt
Commit:7164175e8576144562d9062c4625bcbaa4d670e2 Author:Christopher Jones Wed, 21 Mar 2012 16:12:28 -0700 Parents: 1a0b0ead145deb150f9efb6004534018b5af3a35 Branches: PHP-5.3 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7164175e8576144562d9062c4625bcbaa4d670e2 Log: Add initialization tests for SQLT_INT binds Added tests for SQLT_INT binds particularly to check for uninitialized variables. Changed paths: M ext/oci8/tests/bind_sqltint.phpt Diff: 7164175e8576144562d9062c4625bcbaa4d670e2 diff --git a/ext/oci8/tests/bind_sqltint.phpt b/ext/oci8/tests/bind_sqltint.phpt index f01791d..ac8518e 100644 --- a/ext/oci8/tests/bind_sqltint.phpt +++ b/ext/oci8/tests/bind_sqltint.phpt @@ -123,6 +123,88 @@ oci_execute($s); check_col($c, 'number_t92', 150); +echo "\nTEST151 - 159 Initialization tests\n"; + +$s = oci_parse($c, "begin :p2 := :p1; end;"); +unset($p1); +unset($p2); +oci_bind_by_name($s, ":p1", $p1, 10); +oci_bind_by_name($s, ":p2", $p2, -1, SQLT_INT); +oci_execute($s); +var_dump($p2); + +echo "\nTEST152\n"; + +unset($p1); +$p2 = null; +oci_bind_by_name($s, ":p1", $p1, 10); +oci_bind_by_name($s, ":p2", $p2, -1, SQLT_INT); +oci_execute($s); +var_dump($p2); + +echo "\nTEST153\n"; + +unset($p1); +$p2 = ; +oci_bind_by_name($s, ":p1", $p1, 10); +oci_bind_by_name($s, ":p2", $p2, -1, SQLT_INT); +oci_execute($s); +var_dump($p2); + +echo "\nTEST154\n"; + +$p1 = null; +unset($p2); +oci_bind_by_name($s, ":p1", $p1, 10); +oci_bind_by_name($s, ":p2", $p2, -1, SQLT_INT); +oci_execute($s); +var_dump($p2); + +echo "\nTEST155\n"; + +$p1 = null; +$p2 = null; +oci_bind_by_name($s, ":p1", $p1, 10); +oci_bind_by_name($s, ":p2", $p2, -1, SQLT_INT); +oci_execute($s); +var_dump($p2); + +echo "\nTEST156\n"; + +$p1 = null; +$p2 = ; +oci_bind_by_name($s, ":p1", $p1, 10); +oci_bind_by_name($s, ":p2", $p2, -1, SQLT_INT); +oci_execute($s); +var_dump($p2); + +echo "\nTEST157\n"; + +$p1 = ; +unset($p2); +oci_bind_by_name($s, ":p1", $p1, 10); +oci_bind_by_name($s, ":p2", $p2, -1, SQLT_INT); +oci_execute($s); +var_dump($p2); + +echo "\nTEST158\n"; + +$p1 = ; +$p2 = null; +oci_bind_by_name($s, ":p1", $p1, 10); +oci_bind_by_name($s, ":p2", $p2, -1, SQLT_INT); +oci_execute($s); +var_dump($p2); + +echo "\nTEST159\n"; + +$p1 = ; +$p2 = ; +oci_bind_by_name($s, ":p1", $p1, 10); +oci_bind_by_name($s, ":p2", $p2, -1, SQLT_INT); +oci_execute($s); +var_dump($p2); + // Clean up $stmtarray = array( @@ -224,4 +306,31 @@ array(1) { string(1) "0" } } + +TEST151 - 159 Initialization tests +NULL + +TEST152 +NULL + +TEST153 +NULL + +TEST154 +NULL + +TEST155 +NULL + +TEST156 +NULL + +TEST157 +int() + +TEST158 +int() + +TEST159 +int() ===DONE=== -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com karma: possibly fix for "Allowed memory size exhausted " error: lib/Git/ReceiveHook.php
Commit:b6b01b9106a29aefe97dcab12c39501ff4ecdb69 Author:Alexander Moskaliov Thu, 22 Mar 2012 23:11:40 +0400 Parents: d518a6a76e347636432deb6f415f411dbcd780f0 Branches: master Link: http://git.php.net/?p=karma.git;a=commitdiff;h=b6b01b9106a29aefe97dcab12c39501ff4ecdb69 Log: possibly fix for "Allowed memory size exhausted " error Changed paths: M lib/Git/ReceiveHook.php Diff: b6b01b9106a29aefe97dcab12c39501ff4ecdb69 diff --git a/lib/Git/ReceiveHook.php b/lib/Git/ReceiveHook.php index 0c0bcf1..e4e879a 100644 --- a/lib/Git/ReceiveHook.php +++ b/lib/Git/ReceiveHook.php @@ -84,11 +84,13 @@ abstract class ReceiveHook { $raw = \Git::gitExec('show --name-status --pretty="format:" %s', $revRange); $paths = []; -if (preg_match_all('/([ACDMRTUXB*]+)\s+([^\n\s]+)/', $raw , $matches, PREG_SET_ORDER)) { -foreach($matches as $item) { -$paths[$item[2]] = $item[1]; +$lines = explode("\n", $raw); +foreach($lines as $line) { +if (preg_match('/([ACDMRTUXB*]+)\s+([^\n\s]+)/', $line , $matches)) { +$paths[$matches[2]] = $matches[1]; } } + return $paths; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Add initialization tests for SQLT_INT binds: ext/oci8/tests/bind_sqltint.phpt
Commit:856f10c9ccc41b4c66bd12e6c7ff5135fd87cb13 Author:Christopher Jones Wed, 21 Mar 2012 16:12:28 -0700 Parents: 0592e25a7487883b8c42a15c3a9a342b35192b65 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=856f10c9ccc41b4c66bd12e6c7ff5135fd87cb13 Log: Add initialization tests for SQLT_INT binds Added tests for SQLT_INT binds particularly to check for uninitialized variables. Changed paths: M ext/oci8/tests/bind_sqltint.phpt Diff: 856f10c9ccc41b4c66bd12e6c7ff5135fd87cb13 diff --git a/ext/oci8/tests/bind_sqltint.phpt b/ext/oci8/tests/bind_sqltint.phpt index f01791d..ac8518e 100644 --- a/ext/oci8/tests/bind_sqltint.phpt +++ b/ext/oci8/tests/bind_sqltint.phpt @@ -123,6 +123,88 @@ oci_execute($s); check_col($c, 'number_t92', 150); +echo "\nTEST151 - 159 Initialization tests\n"; + +$s = oci_parse($c, "begin :p2 := :p1; end;"); +unset($p1); +unset($p2); +oci_bind_by_name($s, ":p1", $p1, 10); +oci_bind_by_name($s, ":p2", $p2, -1, SQLT_INT); +oci_execute($s); +var_dump($p2); + +echo "\nTEST152\n"; + +unset($p1); +$p2 = null; +oci_bind_by_name($s, ":p1", $p1, 10); +oci_bind_by_name($s, ":p2", $p2, -1, SQLT_INT); +oci_execute($s); +var_dump($p2); + +echo "\nTEST153\n"; + +unset($p1); +$p2 = ; +oci_bind_by_name($s, ":p1", $p1, 10); +oci_bind_by_name($s, ":p2", $p2, -1, SQLT_INT); +oci_execute($s); +var_dump($p2); + +echo "\nTEST154\n"; + +$p1 = null; +unset($p2); +oci_bind_by_name($s, ":p1", $p1, 10); +oci_bind_by_name($s, ":p2", $p2, -1, SQLT_INT); +oci_execute($s); +var_dump($p2); + +echo "\nTEST155\n"; + +$p1 = null; +$p2 = null; +oci_bind_by_name($s, ":p1", $p1, 10); +oci_bind_by_name($s, ":p2", $p2, -1, SQLT_INT); +oci_execute($s); +var_dump($p2); + +echo "\nTEST156\n"; + +$p1 = null; +$p2 = ; +oci_bind_by_name($s, ":p1", $p1, 10); +oci_bind_by_name($s, ":p2", $p2, -1, SQLT_INT); +oci_execute($s); +var_dump($p2); + +echo "\nTEST157\n"; + +$p1 = ; +unset($p2); +oci_bind_by_name($s, ":p1", $p1, 10); +oci_bind_by_name($s, ":p2", $p2, -1, SQLT_INT); +oci_execute($s); +var_dump($p2); + +echo "\nTEST158\n"; + +$p1 = ; +$p2 = null; +oci_bind_by_name($s, ":p1", $p1, 10); +oci_bind_by_name($s, ":p2", $p2, -1, SQLT_INT); +oci_execute($s); +var_dump($p2); + +echo "\nTEST159\n"; + +$p1 = ; +$p2 = ; +oci_bind_by_name($s, ":p1", $p1, 10); +oci_bind_by_name($s, ":p2", $p2, -1, SQLT_INT); +oci_execute($s); +var_dump($p2); + // Clean up $stmtarray = array( @@ -224,4 +306,31 @@ array(1) { string(1) "0" } } + +TEST151 - 159 Initialization tests +NULL + +TEST152 +NULL + +TEST153 +NULL + +TEST154 +NULL + +TEST155 +NULL + +TEST156 +NULL + +TEST157 +int() + +TEST158 +int() + +TEST159 +int() ===DONE=== -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fix NEWS: NEWS
Commit:1a0b0ead145deb150f9efb6004534018b5af3a35 Author:Johannes Schlüter Thu, 22 Mar 2012 16:40:13 +0100 Parents: b4aea52682a6e7a8f0e2a7638ba37145cb6bf16d Branches: PHP-5.3 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1a0b0ead145deb150f9efb6004534018b5af3a35 Log: Fix NEWS Changed paths: M NEWS Diff: 1a0b0ead145deb150f9efb6004534018b5af3a35 diff --git a/NEWS b/NEWS index 59d2aad..ce48ba0 100644 --- a/NEWS +++ b/NEWS @@ -13,12 +13,12 @@ PHP NEWS . Fixed bug #61072 (Memory leak when restoring an exception handler). (Nikic, Laruence) . Fixed bug #61058 (array_fill leaks if start index is PHP_INT_MAX). - (Laruence) +(Laruence) . Fixed bug #61043 (Regression in magic_quotes_gpc fix for CVE-2012-0831). (Ondřej Surý) . Fixed bug #61000 (Exceeding max nesting level doesn't delete numerical - vars). (Laruence) - . Fix bug #60895 (Possible invalid handler usage in windows random +vars). (Laruence) + . Fixed bug #60895 (Possible invalid handler usage in windows random functions). (Pierre) . Fixed bug #60825 (Segfault when running symfony 2 tests). (Dmitry, Laruence) @@ -134,7 +134,8 @@ PHP NEWS . Fixed bug #54682 (tidy null pointer dereference). (Tony, David Soria Parra) - XMLRPC: - . Fixed bug #61264 (xmlrpc_parse_method_descriptions leaks temporary variable). (Nikita Popov) + . Fixed bug #61264 (xmlrpc_parse_method_descriptions leaks temporary +variable). (Nikita Popov) . Fixed bug #61097 (Memory leak in xmlrpc functions copying zvals). (Nikic) - Zlib: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com karma: fix timezone: hooks/post-receive.bugsweb
Commit:d518a6a76e347636432deb6f415f411dbcd780f0 Author:Alexander Moskaliov Thu, 22 Mar 2012 17:57:26 +0400 Parents: 5a963dbc6c3ef0a08d18ec51bcc795645dc4c8a0 Branches: master Link: http://git.php.net/?p=karma.git;a=commitdiff;h=d518a6a76e347636432deb6f415f411dbcd780f0 Log: fix timezone Changed paths: M hooks/post-receive.bugsweb Diff: d518a6a76e347636432deb6f415f411dbcd780f0 diff --git a/hooks/post-receive.bugsweb b/hooks/post-receive.bugsweb index 030997c..cc91c4a 100755 --- a/hooks/post-receive.bugsweb +++ b/hooks/post-receive.bugsweb @@ -11,6 +11,7 @@ set_include_path( getenv('KARMA_LIB_PATH') ?: LIB_PATH . PATH_SEPARATOR . get_include_path()); +date_default_timezone_set('UTC'); include 'Git.php'; include 'Git/PushInformation.php'; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fixed bug #61423 (gzip compression fails).: ext/soap/php_http.c
Commit:f9f631fb765dc08e3d62073b6eb35ce1b11db0e4 Author:Ilia Alshanetsky Thu, 22 Mar 2012 09:46:33 -0400 Parents: 2630bc6e5fd523bc10c5b3bc064f58a03a846c89 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f9f631fb765dc08e3d62073b6eb35ce1b11db0e4 Log: Fixed bug #61423 (gzip compression fails). Conflicts: NEWS Bugs: https://bugs.php.net/61423 Changed paths: M ext/soap/php_http.c Diff: f9f631fb765dc08e3d62073b6eb35ce1b11db0e4 diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c index a156488..69deccd 100644 --- a/ext/soap/php_http.c +++ b/ext/soap/php_http.c @@ -336,7 +336,7 @@ int make_http_soap_request(zval *this_ptr, n = 3; ZVAL_STRING(&func, "gzencode", 0); smart_str_append_const(&soap_headers_z,"Content-Encoding: gzip\r\n"); - ZVAL_LONG(params[2], 1); + ZVAL_LONG(params[2], 0x1f); } if (call_user_function(CG(function_table), (zval**)NULL, &func, &retval, n, params TSRMLS_CC) == SUCCESS && Z_TYPE(retval) == IS_STRING) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fixed bug #61423 (gzip compression fails).: NEWS ext/soap/php_http.c
Commit:b4aea52682a6e7a8f0e2a7638ba37145cb6bf16d Author:Ilia Alshanetsky Thu, 22 Mar 2012 09:13:45 -0400 Parents: 672fe54a00a97509c1ea08c450fe1597201c354d Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b4aea52682a6e7a8f0e2a7638ba37145cb6bf16d Log: Fixed bug #61423 (gzip compression fails). Bugs: https://bugs.php.net/61423 Changed paths: M NEWS M ext/soap/php_http.c Diff: b4aea52682a6e7a8f0e2a7638ba37145cb6bf16d diff --git a/NEWS b/NEWS index fa156b9..59d2aad 100644 --- a/NEWS +++ b/NEWS @@ -90,6 +90,7 @@ PHP NEWS - SOAP . Fixed basic HTTP authentication for WSDL sub requests. (Dmitry) + . Fixed bug #61423 (gzip compression fails). (Ilia) . Fixed bug #60887 (SoapClient ignores user_agent option and sends no User-Agent header). (carloschilazo at gmail dot com) . Fixed bug #60842, #51775 (Chunked response parsing error when diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c index 358877d..610c161 100644 --- a/ext/soap/php_http.c +++ b/ext/soap/php_http.c @@ -336,7 +336,7 @@ int make_http_soap_request(zval *this_ptr, n = 3; ZVAL_STRING(&func, "gzencode", 0); smart_str_append_const(&soap_headers_z,"Content-Encoding: gzip\r\n"); - ZVAL_LONG(params[2], 1); + ZVAL_LONG(params[2], 0x1f); } if (call_user_function(CG(function_table), (zval**)NULL, &func, &retval, n, params TSRMLS_CC) == SUCCESS && Z_TYPE(retval) == IS_STRING) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: BFN: NEWS
Commit:2630bc6e5fd523bc10c5b3bc064f58a03a846c89 Author:Ilia Alshanetsky Thu, 22 Mar 2012 09:15:40 -0400 Parents: 30f6a9ba485c3b91b14a8ec8c575106f1effec38 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2630bc6e5fd523bc10c5b3bc064f58a03a846c89 Log: BFN Changed paths: M NEWS Diff: 2630bc6e5fd523bc10c5b3bc064f58a03a846c89 diff --git a/NEWS b/NEWS index cc2de2e..c0ba091 100644 --- a/NEWS +++ b/NEWS @@ -69,6 +69,7 @@ PHP NEWS SessionHandler::write()). (Ilia) - SOAP + . Fixed bug #61423 (gzip compression fails). (Ilia) . Fixed bug #60887 (SoapClient ignores user_agent option and sends no User-Agent header). (carloschilazo at gmail dot com) . Fixed bug #60842, #51775 (Chunked response parsing error when -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com karma: Remove var_dump: lib/Git/PostReceiveHook.php
Commit:5a963dbc6c3ef0a08d18ec51bcc795645dc4c8a0 Author:Alexander Moskaliov Thu, 22 Mar 2012 16:46:03 +0400 Parents: 27a6e56893c4bbb46b11d8270cef1874d1e9b0ac Branches: master Link: http://git.php.net/?p=karma.git;a=commitdiff;h=5a963dbc6c3ef0a08d18ec51bcc795645dc4c8a0 Log: Remove var_dump Changed paths: M lib/Git/PostReceiveHook.php Diff: 5a963dbc6c3ef0a08d18ec51bcc795645dc4c8a0 diff --git a/lib/Git/PostReceiveHook.php b/lib/Git/PostReceiveHook.php index 42255b0..11d3996 100644 --- a/lib/Git/PostReceiveHook.php +++ b/lib/Git/PostReceiveHook.php @@ -96,7 +96,6 @@ class PostReceiveHook extends ReceiveHook $this->log('Found revisions: '. implode(' ', array_keys($this->revisions))); //send mails per commit foreach ($this->revisions as $revision => $branches) { -var_dump($branches); // check if it commit was already in other branches if (!$this->isRevExistsInBranches($revision, array_diff($this->allBranches, $branches))) { $this->sendCommitMail($revision, $branches); @@ -573,7 +572,7 @@ class PostReceiveHook extends ReceiveHook } } -var_dump($isTrivialMerge); + if (!$isTrivialMerge) { $mail->setMessage($message); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Revert "Fixed reference counting": ext/spl/spl_directory.c
Commit:dd33437eee9b87cd4022eae5037a75656396f937 Author:Dmitry Stogov Thu, 22 Mar 2012 15:52:32 +0400 Parents: 752fec88ef5ce15c750776d008ae843ee1ba761e Branches: PHP-5.4 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=dd33437eee9b87cd4022eae5037a75656396f937 Log: Revert "Fixed reference counting" This reverts commit 752fec88ef5ce15c750776d008ae843ee1ba761e. Changed paths: M ext/spl/spl_directory.c Diff: dd33437eee9b87cd4022eae5037a75656396f937 diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index 7bd340b..c6eec94 100755 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -1655,8 +1655,8 @@ zend_object_iterator *spl_filesystem_dir_get_iterator(zend_class_entry *ce, zval /* ->current must be initialized; rewind doesn't set it and valid * doesn't check whether it's set */ iterator->current = object; - Z_SET_REFCOUNT_P(object, Z_REFCOUNT_P(object) + 2); } + zval_add_ref(&object); return (zend_object_iterator*)iterator; } @@ -1858,8 +1858,8 @@ zend_object_iterator *spl_filesystem_tree_get_iterator(zend_class_entry *ce, zva if (iterator->intern.data == NULL) { iterator->intern.data = object; iterator->intern.funcs = &spl_filesystem_tree_it_funcs; - zval_add_ref(&object); } + zval_add_ref(&object); return (zend_object_iterator*)iterator; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Revert "Fixed reference counting": ext/spl/spl_directory.c
Commit:6f49678fd82913b9aefbf6bf492e6017d4ba14bd Author:Dmitry Stogov Thu, 22 Mar 2012 15:51:33 +0400 Parents: 5bf1efbf209b7d14edc8d01098465ed0bdda1516 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6f49678fd82913b9aefbf6bf492e6017d4ba14bd Log: Revert "Fixed reference counting" This reverts commit 5bf1efbf209b7d14edc8d01098465ed0bdda1516. Changed paths: M ext/spl/spl_directory.c Diff: 6f49678fd82913b9aefbf6bf492e6017d4ba14bd diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index 7bd340b..c6eec94 100755 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -1655,8 +1655,8 @@ zend_object_iterator *spl_filesystem_dir_get_iterator(zend_class_entry *ce, zval /* ->current must be initialized; rewind doesn't set it and valid * doesn't check whether it's set */ iterator->current = object; - Z_SET_REFCOUNT_P(object, Z_REFCOUNT_P(object) + 2); } + zval_add_ref(&object); return (zend_object_iterator*)iterator; } @@ -1858,8 +1858,8 @@ zend_object_iterator *spl_filesystem_tree_get_iterator(zend_class_entry *ce, zva if (iterator->intern.data == NULL) { iterator->intern.data = object; iterator->intern.funcs = &spl_filesystem_tree_it_funcs; - zval_add_ref(&object); } + zval_add_ref(&object); return (zend_object_iterator*)iterator; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com karma: add repository name to log: lib/Git/ReceiveHook.php
Commit:27a6e56893c4bbb46b11d8270cef1874d1e9b0ac Author:Alexander Moskaliov Thu, 22 Mar 2012 16:36:36 +0400 Parents: 34cd04cc94a253a3ea31eea0cfa376b1ab205a81 Branches: master Link: http://git.php.net/?p=karma.git;a=commitdiff;h=27a6e56893c4bbb46b11d8270cef1874d1e9b0ac Log: add repository name to log Changed paths: M lib/Git/ReceiveHook.php Diff: 27a6e56893c4bbb46b11d8270cef1874d1e9b0ac diff --git a/lib/Git/ReceiveHook.php b/lib/Git/ReceiveHook.php index 5f30d9a..0c0bcf1 100644 --- a/lib/Git/ReceiveHook.php +++ b/lib/Git/ReceiveHook.php @@ -125,7 +125,7 @@ abstract class ReceiveHook */ public function hookInput() { -$this->log('New hook call '. date('r')); +$this->log('New hook call ' . $this->getRepositoryName() . ' ' . date('r')); $parsed_input = []; while (!feof(STDIN)) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Revert "Fixed reference counting": ext/spl/spl_directory.c
Commit:672fe54a00a97509c1ea08c450fe1597201c354d Author:Dmitry Stogov Thu, 22 Mar 2012 15:51:58 +0400 Parents: 14af1fe6923c65a91cd77eab5a8d4326f854391d Branches: PHP-5.3 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=672fe54a00a97509c1ea08c450fe1597201c354d Log: Revert "Fixed reference counting" This reverts commit 14af1fe6923c65a91cd77eab5a8d4326f854391d. Changed paths: M ext/spl/spl_directory.c Diff: 672fe54a00a97509c1ea08c450fe1597201c354d diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index 9d454c9..fb19823 100755 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -1644,8 +1644,8 @@ zend_object_iterator *spl_filesystem_dir_get_iterator(zend_class_entry *ce, zval /* ->current must be initialized; rewind doesn't set it and valid * doesn't check whether it's set */ iterator->current = object; - Z_SET_REFCOUNT_P(object, Z_REFCOUNT_P(object) + 2); } + zval_add_ref(&object); return (zend_object_iterator*)iterator; } @@ -1847,8 +1847,8 @@ zend_object_iterator *spl_filesystem_tree_get_iterator(zend_class_entry *ce, zva if (iterator->intern.data == NULL) { iterator->intern.data = object; iterator->intern.funcs = &spl_filesystem_tree_it_funcs; - zval_add_ref(&object); } + zval_add_ref(&object); return (zend_object_iterator*)iterator; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fixed reference counting: ext/spl/spl_directory.c
Commit:14af1fe6923c65a91cd77eab5a8d4326f854391d Author:Dmitry Stogov Thu, 22 Mar 2012 14:38:38 +0400 Parents: 523396cb28a0cb87ced9ec1179ef4f119d28ec80 Branches: PHP-5.4 5bf1efbf209b7d14edc8d01098465ed0bdda1516 ef678028bf8b9b3fde0d609328c2722040fba269 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=14af1fe6923c65a91cd77eab5a8d4326f854391d Log: Fixed reference counting Changed paths: M ext/spl/spl_directory.c Diff: 14af1fe6923c65a91cd77eab5a8d4326f854391d diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index fb19823..9d454c9 100755 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -1644,8 +1644,8 @@ zend_object_iterator *spl_filesystem_dir_get_iterator(zend_class_entry *ce, zval /* ->current must be initialized; rewind doesn't set it and valid * doesn't check whether it's set */ iterator->current = object; + Z_SET_REFCOUNT_P(object, Z_REFCOUNT_P(object) + 2); } - zval_add_ref(&object); return (zend_object_iterator*)iterator; } @@ -1847,8 +1847,8 @@ zend_object_iterator *spl_filesystem_tree_get_iterator(zend_class_entry *ce, zva if (iterator->intern.data == NULL) { iterator->intern.data = object; iterator->intern.funcs = &spl_filesystem_tree_it_funcs; + zval_add_ref(&object); } - zval_add_ref(&object); return (zend_object_iterator*)iterator; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Merge branch 'PHP-5.3' into PHP-5.4: ext/spl/spl_directory.c
Commit:b60f9fe146eea4edbcc1c17172d8ee3c0c719c82 Author:David Soria Parra Thu, 22 Mar 2012 12:13:52 +0100 Parents: 0b646e8027131a1fb127e1e6cc845319b65e46a4 14af1fe6923c65a91cd77eab5a8d4326f854391d Branches: PHP-5.4 5bf1efbf209b7d14edc8d01098465ed0bdda1516 ef678028bf8b9b3fde0d609328c2722040fba269 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b60f9fe146eea4edbcc1c17172d8ee3c0c719c82 Log: Merge branch 'PHP-5.3' into PHP-5.4 * PHP-5.3: Fixed reference counting Changed paths: MM ext/spl/spl_directory.c b60f9fe146eea4edbcc1c17172d8ee3c0c719c82 diff --combined ext/spl/spl_directory.c index c6eec94,9d454c9..7bd340b --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@@ -148,6 -148,7 +148,6 @@@ static zend_object_value spl_filesystem { zend_object_value retval; spl_filesystem_object *intern; - zval *tmp; intern = emalloc(sizeof(spl_filesystem_object)); memset(intern, 0, sizeof(spl_filesystem_object)); @@@ -157,7 -158,7 +157,7 @@@ if (obj) *obj = intern; zend_object_std_init(&intern->std, class_type TSRMLS_CC); - zend_hash_copy(intern->std.properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *)); + object_properties_init(&intern->std, class_type); retval.handle = zend_objects_store_put(intern, (zend_objects_store_dtor_t) zend_objects_destroy_object, (zend_objects_free_object_storage_t) spl_filesystem_object_free_storage, NULL TSRMLS_CC); retval.handlers = &spl_filesystem_object_handlers; @@@ -244,7 -245,7 +244,7 @@@ static void spl_filesystem_dir_open(spl intern->type = SPL_FS_DIR; intern->_path_len = strlen(path); - intern->u.dir.dirp = php_stream_opendir(path, ENFORCE_SAFE_MODE|REPORT_ERRORS, NULL); + intern->u.dir.dirp = php_stream_opendir(path, REPORT_ERRORS, FG(default_context)); if (intern->_path_len > 1 && IS_SLASH_AT(path, intern->_path_len-1)) { intern->_path = estrndup(path, --intern->_path_len); @@@ -270,20 -271,9 +270,20 @@@ static int spl_filesystem_file_open(spl_filesystem_object *intern, int use_include_path, int silent TSRMLS_DC) /* {{{ */ { + zval tmp; + intern->type = SPL_FS_FILE; + + php_stat(intern->file_name, intern->file_name_len, FS_IS_DIR, &tmp TSRMLS_CC); + if (Z_LVAL(tmp)) { + intern->u.file.open_mode = NULL; + intern->file_name = NULL; + zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Cannot use SplFileObject with directories"); + return FAILURE; + } + intern->u.file.context = php_stream_context_from_zval(intern->u.file.zcontext, 0); - intern->u.file.stream = php_stream_open_wrapper_ex(intern->file_name, intern->u.file.open_mode, (use_include_path ? USE_PATH : 0) | ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL, intern->u.file.context); + intern->u.file.stream = php_stream_open_wrapper_ex(intern->file_name, intern->u.file.open_mode, (use_include_path ? USE_PATH : 0) | REPORT_ERRORS, NULL, intern->u.file.context); if (!intern->file_name_len || !intern->u.file.stream) { if (!EG(exception)) { @@@ -595,10 -585,6 +595,10 @@@ static HashTable* spl_filesystem_object *is_temp = 1; + if (!intern->std.properties) { + rebuild_object_properties(&intern->std); + } + ALLOC_HASHTABLE(rv); ZEND_INIT_SYMTABLE_EX(rv, zend_hash_num_elements(intern->std.properties) + 3, 0); @@@ -660,17 -646,16 +660,17 @@@ } /* }}} */ -zend_function *spl_filesystem_object_get_method_check(zval **object_ptr, char *method, int method_len TSRMLS_DC) /* {{{ */ +zend_function *spl_filesystem_object_get_method_check(zval **object_ptr, char *method, int method_len, const struct _zend_literal *key TSRMLS_DC) /* {{{ */ { spl_filesystem_object *fsobj = zend_object_store_get_object(*object_ptr TSRMLS_CC); if (fsobj->u.dir.entry.d_name[0] == '\0' && fsobj->orig_path == NULL) { method = "_bad_state_ex"; method_len = sizeof("_bad_state_ex") - 1; + key = NULL; } - return zend_get_std_object_handlers()->get_method(object_ptr, method, method_len TSRMLS_CC); + return zend_get_std_object_handlers()->get_method(object_ptr, method, method_len, key TSRMLS_CC); } /* }}} */ @@@ -1252,7 -1237,11 +1252,7 @@@ SPL_METHOD(SplFileInfo, getLinkTarget RETURN_FALSE; } else if (!IS_ABSOLUTE_PATH(intern->file_name, intern->file_name_len)) { char expanded_path[MAXPATHLEN]; - - /* TODO: Fix expand_filepath to do not resolve links but only expand the path - avoiding double two resolution attempts - (Pierre) */ - if (!expand_filepath(intern->file_name, expa
[PHP-CVS] com php-src: Revert "Fixed reference counting": ext/spl/spl_directory.c
Commit:0b646e8027131a1fb127e1e6cc845319b65e46a4 Author:David Soria Parra Thu, 22 Mar 2012 12:13:31 +0100 Parents: 752fec88ef5ce15c750776d008ae843ee1ba761e Branches: PHP-5.4 5bf1efbf209b7d14edc8d01098465ed0bdda1516 ef678028bf8b9b3fde0d609328c2722040fba269 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0b646e8027131a1fb127e1e6cc845319b65e46a4 Log: Revert "Fixed reference counting" This reverts commit 752fec88ef5ce15c750776d008ae843ee1ba761e. Changed paths: M ext/spl/spl_directory.c Diff: 0b646e8027131a1fb127e1e6cc845319b65e46a4 diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index 7bd340b..c6eec94 100755 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -1655,8 +1655,8 @@ zend_object_iterator *spl_filesystem_dir_get_iterator(zend_class_entry *ce, zval /* ->current must be initialized; rewind doesn't set it and valid * doesn't check whether it's set */ iterator->current = object; - Z_SET_REFCOUNT_P(object, Z_REFCOUNT_P(object) + 2); } + zval_add_ref(&object); return (zend_object_iterator*)iterator; } @@ -1858,8 +1858,8 @@ zend_object_iterator *spl_filesystem_tree_get_iterator(zend_class_entry *ce, zva if (iterator->intern.data == NULL) { iterator->intern.data = object; iterator->intern.funcs = &spl_filesystem_tree_it_funcs; - zval_add_ref(&object); } + zval_add_ref(&object); return (zend_object_iterator*)iterator; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fixed reference counting: ext/spl/spl_directory.c
Commit:14af1fe6923c65a91cd77eab5a8d4326f854391d Author:Dmitry Stogov Thu, 22 Mar 2012 14:38:38 +0400 Parents: 523396cb28a0cb87ced9ec1179ef4f119d28ec80 Branches: PHP-5.3 df129ae7ea983bab9947c97f15244870a748d729 752fec88ef5ce15c750776d008ae843ee1ba761e PHP-5.4 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=14af1fe6923c65a91cd77eab5a8d4326f854391d Log: Fixed reference counting Changed paths: M ext/spl/spl_directory.c Diff: 14af1fe6923c65a91cd77eab5a8d4326f854391d diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index fb19823..9d454c9 100755 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -1644,8 +1644,8 @@ zend_object_iterator *spl_filesystem_dir_get_iterator(zend_class_entry *ce, zval /* ->current must be initialized; rewind doesn't set it and valid * doesn't check whether it's set */ iterator->current = object; + Z_SET_REFCOUNT_P(object, Z_REFCOUNT_P(object) + 2); } - zval_add_ref(&object); return (zend_object_iterator*)iterator; } @@ -1847,8 +1847,8 @@ zend_object_iterator *spl_filesystem_tree_get_iterator(zend_class_entry *ce, zva if (iterator->intern.data == NULL) { iterator->intern.data = object; iterator->intern.funcs = &spl_filesystem_tree_it_funcs; + zval_add_ref(&object); } - zval_add_ref(&object); return (zend_object_iterator*)iterator; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fix test, and merge the modification from trunk: ext/mbstring/tests/mb_eregi_replace.phpt
Commit:523396cb28a0cb87ced9ec1179ef4f119d28ec80 Author:Xinchen Hui Thu, 22 Mar 2012 17:30:16 +0800 Parents: 27208de76323186e91541beed36c863c7ba5c997 Branches: PHP-5.3 8254e21a688f2fe83f4cfe57617df792ae659d9a df129ae7ea983bab9947c97f15244870a748d729 PHP-5.4 31ae08b62f795c3e62dadf52d189d082f77a6556 191df5bd06a71b5f0f1015596ed27a902554a95a master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=523396cb28a0cb87ced9ec1179ef4f119d28ec80 Log: Fix test, and merge the modification from trunk Changed paths: M ext/mbstring/tests/mb_eregi_replace.phpt Diff: 523396cb28a0cb87ced9ec1179ef4f119d28ec80 diff --git a/ext/mbstring/tests/mb_eregi_replace.phpt b/ext/mbstring/tests/mb_eregi_replace.phpt index dd6162c..22ba0af 100644 --- a/ext/mbstring/tests/mb_eregi_replace.phpt +++ b/ext/mbstring/tests/mb_eregi_replace.phpt @@ -29,9 +29,9 @@ function do_translit($st) { return $st; } -echo do_translit("Фуцк"); +echo do_translit("Пеар"); ?> --EXPECT-- -Fuck +Pear --CREDITS-- -Testfest Wuerzburg 2009-06-20 +Testfest Wuerzburg 2009-06-20 (modified by rui 2011-10-15) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Ignore the tempoary files: .gitignore
Commit:27208de76323186e91541beed36c863c7ba5c997 Author:Xinchen Hui Thu, 22 Mar 2012 17:22:17 +0800 Parents: e96a172114dc6e491e265f3542c735b99e0ce557 Branches: PHP-5.3 2dbced096a3c3bc88cb0017ec1c3c0ade19e7951 8254e21a688f2fe83f4cfe57617df792ae659d9a PHP-5.4 f6e7320da8cbd563d01bda1bc9489b58f6edf897 31ae08b62f795c3e62dadf52d189d082f77a6556 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=27208de76323186e91541beed36c863c7ba5c997 Log: Ignore the tempoary files Changed paths: M .gitignore Diff: 27208de76323186e91541beed36c863c7ba5c997 diff --git a/.gitignore b/.gitignore index f295248..6f291dc 100644 --- a/.gitignore +++ b/.gitignore @@ -109,6 +109,12 @@ main/php_config.h main/php_config.h.in # Test specific Ignores +tests/*/*.diff +tests/*/*.out +tests/*/*.php +tests/*/*.exp +tests/*/*.log +tests/*/*.sh */tests/*.diff */tests/*.out */tests/*.php @@ -127,6 +133,12 @@ main/php_config.h.in */*/tests/*.exp */*/tests/*.log */*/tests/*.sh +*/*/tests/*/*.diff +*/*/tests/*/*.out +*/*/tests/*/*.php +*/*/tests/*/*.exp +*/*/tests/*/*.log +*/*/tests/*/*.sh # Extension specifc ignores ext/*/configure.in -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fix test, which was broken by the fix for #61173: ext/fileinfo/tests/finfo_open_error.phpt
Commit:e96a172114dc6e491e265f3542c735b99e0ce557 Author:Xinchen Hui Thu, 22 Mar 2012 17:10:03 +0800 Parents: cdc5d4a801dbe60508697ee4334ba2368a86a2cb Branches: PHP-5.3 c0e9767131c01729f94c313850c11df127867225 2dbced096a3c3bc88cb0017ec1c3c0ade19e7951 PHP-5.4 d7733dd3cfeff6d5aed05a8e0ae63af7c9925d18 f6e7320da8cbd563d01bda1bc9489b58f6edf897 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e96a172114dc6e491e265f3542c735b99e0ce557 Log: Fix test, which was broken by the fix for #61173 Bugs: https://bugs.php.net/61173 Changed paths: M ext/fileinfo/tests/finfo_open_error.phpt Diff: e96a172114dc6e491e265f3542c735b99e0ce557 diff --git a/ext/fileinfo/tests/finfo_open_error.phpt b/ext/fileinfo/tests/finfo_open_error.phpt index 2876b17..aae229f 100644 --- a/ext/fileinfo/tests/finfo_open_error.phpt +++ b/ext/fileinfo/tests/finfo_open_error.phpt @@ -41,6 +41,5 @@ Warning: finfo_open() expects parameter 1 to be long, %unicode_string_optional% bool(false) Warning: finfo::finfo() expects parameter 1 to be long, %unicode_string_optional% given in %s on line %d -object(finfo)#%d (%d) { -} +NULL ===DONE=== -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com karma: Check for empty outputs, not for return values: lib/Git/PostReceiveHook.php
Commit:4eb17646d5c809be94d25e04910db474e4ff1848 Author:David Soria Parra Thu, 22 Mar 2012 07:55:38 +0100 Committer: Alexander Moskaliov Thu, 22 Mar 2012 12:27:17 +0400 Parents: 42b7508bdc7867645728fb9e765aecadae333609 Branches: master Link: http://git.php.net/?p=karma.git;a=commitdiff;h=4eb17646d5c809be94d25e04910db474e4ff1848 Log: Check for empty outputs, not for return values gitExec doesnt return the return value but the output. Therefore check if the output in isRevInBranches is empty. This indicates that it is not. Changed paths: M lib/Git/PostReceiveHook.php Diff: 4eb17646d5c809be94d25e04910db474e4ff1848 diff --git a/lib/Git/PostReceiveHook.php b/lib/Git/PostReceiveHook.php index b7efb42..f1594f6 100644 --- a/lib/Git/PostReceiveHook.php +++ b/lib/Git/PostReceiveHook.php @@ -589,7 +589,8 @@ class PostReceiveHook extends ReceiveHook * @return bool */ private function isRevExistsInBranches($revision, array $branches) { -return !(bool) \Git::gitExec('rev-list --max-count=1 %s --not %s', escapeshellarg($revision), implode(' ', $this->escapeArrayShellArgs($branches))); +$output = \Git::gitExec('rev-list --max-count=1 %s --not %s', escapeshellarg($revision), implode(' ', $this->escapeArrayShellArgs($branches))); +return !empty($output); } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com karma: Fix double "<" and ">" in tagger email: lib/Git/PostReceiveHook.php
Commit:017216d047d98445579ff6a4fe55dbcb1c7bc85c Author:Alexander Moskaliov Thu, 22 Mar 2012 12:29:30 +0400 Parents: 4eb17646d5c809be94d25e04910db474e4ff1848 Branches: master Link: http://git.php.net/?p=karma.git;a=commitdiff;h=017216d047d98445579ff6a4fe55dbcb1c7bc85c Log: Fix double "<" and ">" in tagger email getTagInfo return mail with < and >, getCommitInfo without Changed paths: M lib/Git/PostReceiveHook.php Diff: 017216d047d98445579ff6a4fe55dbcb1c7bc85c diff --git a/lib/Git/PostReceiveHook.php b/lib/Git/PostReceiveHook.php index f1594f6..868fc6c 100644 --- a/lib/Git/PostReceiveHook.php +++ b/lib/Git/PostReceiveHook.php @@ -281,7 +281,7 @@ class PostReceiveHook extends ReceiveHook if ($info['annotated']) { $message .= 'Tag: ' . $info['revision'] . "\n"; -$message .= 'Tagger: ' . $info['tagger'] . ' <' . $info['tagger_email'] . '> ' . $info['tagger_date'] . "\n"; +$message .= 'Tagger: ' . $info['tagger'] . $info['tagger_email'] . ' ' . $info['tagger_date'] . "\n"; $message .= "Log:\n" . $info['log'] . "\n"; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] tag php-src: create tag PHP-5.4.1-RC1
Tag PHP-5.4.1-RC1 in php-src.git was created Tag: 21a74f2e57e416594a454764db0dcf6337eb3210 Tagger: Stanislav Malyshev <> Thu Mar 22 01:03:34 2012 -0700 Log: 5.4.1 RC1 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (Darwin) iF4EABEIAAYFAk9q3N4ACgkQL3lWvF2gS119AwD9FcpJNAHhkzeb7a1+TWCEZmge z5Fo7DRmnyZa3jXtlboBAIAiElPJbK6+RAAFu/kzcWgYCfOgE7ApZ9eDYIHWoEZb =cpAl -END PGP SIGNATURE- Link: http://git.php.net/?p=php-src.git;a=tag;h=21a74f2e57e416594a454764db0dcf6337eb3210 Target: 8cdfc8bead815973d29ca5499b16b7171c0a45bc Author: Stanislav Malyshev Wed, 21 Mar 2012 23:48:42 -0700 Parents: c0e9767131c01729f94c313850c11df127867225 Target link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8cdfc8bead815973d29ca5499b16b7171c0a45bc Target log: 5.4.1RC1 Changed paths: M NEWS M configure.in M main/php_version.h -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com karma: Simplify getting branches and revision: lib/Git/PostReceiveHook.php
Commit:a6bcc1358deb70b85644ed594db3cbd8f5d65a35 Author:David Soria Parra Wed, 21 Mar 2012 19:20:39 +0100 Parents: 42b7508bdc7867645728fb9e765aecadae333609 Branches: dsp/playground Link: http://git.php.net/?p=karma.git;a=commitdiff;h=a6bcc1358deb70b85644ed594db3cbd8f5d65a35 Log: Simplify getting branches and revision Changed paths: M lib/Git/PostReceiveHook.php a6bcc1358deb70b85644ed594db3cbd8f5d65a35 diff --git a/lib/Git/PostReceiveHook.php b/lib/Git/PostReceiveHook.php index b7efb42..1e18195 100644 --- a/lib/Git/PostReceiveHook.php +++ b/lib/Git/PostReceiveHook.php @@ -78,140 +78,26 @@ class PostReceiveHook extends ReceiveHook } } } -$this->alreadyExistsBranches = array_diff($this->allBranches, $newBranches); //send mails per ref push +$revisions = []; + foreach ($this->refs as $ref) { if ($ref['reftype'] == self::REF_TAG) { $this->sendTagMail($ref['refname'], $ref['changetype'], $ref['old'], $ref['new']); } -} -foreach($this->refs as $ref) { -// magic populate the $this->revisions -if ($ref['changetype'] != self::TYPE_DELETED) { -$this->getBranchRevisions($ref['refname'], $ref['changetype'], $ref['old'], $ref['new']); -} -} -//send mails per commit -foreach ($this->revisions as $revision => $branches) { -// check if it commit was already in other branches -if (!$this->isRevExistsInBranches($revision, array_diff($this->allBranches, $branches))) { -$this->sendCommitMail($revision, $branches); -} +$revisions = array_merge( +$revisions, +$this->getRevisions(escapeshellarg($ref['old'] . '..' . $ref['new']))); } -} -/** - * Send mail about branch. - * Subject: [git] [branch] %PROJECT%: %STATUS% branch %BRANCH_NAME% - * Body: - * Branch %BRANCH_NAME% in %PROJECT% was %STATUS% - * Date: Thu, 08 Mar 2012 12:39:48 +(current mail date) - * - * Link: http://git.php.net/?p=%PROJECT_PATH%;a=log;h=%SHA_NEW%;hp=%SHA_OLD% - * - * --part1-- - * Log: - * - * --per commit-- - * Commit: %SHA% - * Author: %USER% Thu, 08 Mar 2012 12:39:48 + - * Committer: %USER% Thu, 08 Mar 2012 12:39:48 + - * Link: http://git.php.net/?p=%PROJECT_PATH%;a=commitdiff;h=%SHA% - * Shortlog: %COMMIT_SUBJECT% - * --/per commit-- - * - * --/part1-- - * - * @param string $name branch fullname (refs/heads/example) - * @param int $changeType delete, create or update - * @param string $oldrev old revision - * @param string $newrev new revision - * @return string mail uniq id - */ -private function sendBranchMail($name, $changeType, $oldrev, $newrev) -{ - -$logString = ''; -$status = [self::TYPE_UPDATED => 'update', self::TYPE_CREATED => 'create', self::TYPE_DELETED => 'delete']; -$shortname = str_replace('refs/heads/', '', $name); - -// forced push -if ($changeType == self::TYPE_UPDATED) { -$replacedRevisions = $this->getRevisions(escapeshellarg($newrev . '..' . $oldrev)) ?: false; -} else { -$replacedRevisions = false; -} - -if ($changeType != self::TYPE_DELETED) { - -$revisions = $this->getBranchRevisions($name, $changeType, $oldrev, $newrev); - -if (count($revisions)) { - -$logString = ''; - -foreach ($revisions as $revision) { -$commitInfo = $this->getCommitInfo($revision); -$logString .= 'Commit:' . $revision . "\n"; -$logString .= 'Author:' . $commitInfo['author'] . ' <' . $commitInfo['author_email'] . '> ' . $commitInfo['author_date'] . "\n"; -if (($commitInfo['author'] != $commitInfo['committer']) || ($commitInfo['author_email'] != $commitInfo['committer_email'])) { -$logString .= 'Committer: ' . $commitInfo['committer'] . ' <' . $commitInfo['committer_email'] . '> ' . $commitInfo['committer_date'] . "\n"; -} -$logString .= 'Link: http://git.php.net/?p=' . $this->getRepositoryName() . ";a=commitdiff;h=" . $revision . "\n"; -$logString .= 'Shortlog: ' . $commitInfo['subject'] . "\n"; -$logString .= "\n"; - -} -} +foreach (array_unique($revisions) as $revision) { +$this->sendCommitMail($revision); } -$mail = new \Mail(); -$mail->setSubject($this->emailPrefix . 'push ' . $this->getRepositoryShortName() . ': ' . $status[$changeType] . ' branch ' . $shortname); - -
[PHP-CVS] com karma: Do not include delete revisions: lib/Git/PostReceiveHook.php
Commit:1f3087ca7e2bcdad1695b789797ff43079cee36f Author:David Soria Parra Wed, 21 Mar 2012 19:31:43 +0100 Parents: a6bcc1358deb70b85644ed594db3cbd8f5d65a35 Branches: dsp/playground Link: http://git.php.net/?p=karma.git;a=commitdiff;h=1f3087ca7e2bcdad1695b789797ff43079cee36f Log: Do not include delete revisions Changed paths: M lib/Git/PostReceiveHook.php Diff: 1f3087ca7e2bcdad1695b789797ff43079cee36f diff --git a/lib/Git/PostReceiveHook.php b/lib/Git/PostReceiveHook.php index 1e18195..bebe0ee 100644 --- a/lib/Git/PostReceiveHook.php +++ b/lib/Git/PostReceiveHook.php @@ -86,10 +86,11 @@ class PostReceiveHook extends ReceiveHook if ($ref['reftype'] == self::REF_TAG) { $this->sendTagMail($ref['refname'], $ref['changetype'], $ref['old'], $ref['new']); } - -$revisions = array_merge( -$revisions, -$this->getRevisions(escapeshellarg($ref['old'] . '..' . $ref['new']))); +if ($ref['retype'] != self::TYPE_DELETED) { + $revisions = array_merge( + $revisions, + $this->getRevisions(escapeshellarg($ref['old'] . '..' . $ref['new']))); + } } foreach (array_unique($revisions) as $revision) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com karma: Omit already existing revisions: lib/Git/PostReceiveHook.php
Commit:581922de1992198175a75458fbea2c9066d7dea0 Author:David Soria Parra Wed, 21 Mar 2012 19:48:30 +0100 Parents: 1f3087ca7e2bcdad1695b789797ff43079cee36f Branches: dsp/playground Link: http://git.php.net/?p=karma.git;a=commitdiff;h=581922de1992198175a75458fbea2c9066d7dea0 Log: Omit already existing revisions Changed paths: M lib/Git/PostReceiveHook.php Diff: 581922de1992198175a75458fbea2c9066d7dea0 diff --git a/lib/Git/PostReceiveHook.php b/lib/Git/PostReceiveHook.php index bebe0ee..937c283 100644 --- a/lib/Git/PostReceiveHook.php +++ b/lib/Git/PostReceiveHook.php @@ -94,7 +94,9 @@ class PostReceiveHook extends ReceiveHook } foreach (array_unique($revisions) as $revision) { -$this->sendCommitMail($revision); +if (!$this->isRevExistsInBranches($revision, $this->allBranches)) { +$this->sendCommitMail($revision); +} } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com karma: Typo: lib/Git/PostReceiveHook.php
Commit:c07c79adcbb07fe0ce6a545b6033947a892b5605 Author:David Soria Parra Wed, 21 Mar 2012 19:50:39 +0100 Parents: 581922de1992198175a75458fbea2c9066d7dea0 Branches: dsp/playground Link: http://git.php.net/?p=karma.git;a=commitdiff;h=c07c79adcbb07fe0ce6a545b6033947a892b5605 Log: Typo Changed paths: M lib/Git/PostReceiveHook.php Diff: c07c79adcbb07fe0ce6a545b6033947a892b5605 diff --git a/lib/Git/PostReceiveHook.php b/lib/Git/PostReceiveHook.php index 937c283..44e4144 100644 --- a/lib/Git/PostReceiveHook.php +++ b/lib/Git/PostReceiveHook.php @@ -86,7 +86,7 @@ class PostReceiveHook extends ReceiveHook if ($ref['reftype'] == self::REF_TAG) { $this->sendTagMail($ref['refname'], $ref['changetype'], $ref['old'], $ref['new']); } -if ($ref['retype'] != self::TYPE_DELETED) { +if ($ref['reftype'] != self::TYPE_DELETED) { $revisions = array_merge( $revisions, $this->getRevisions(escapeshellarg($ref['old'] . '..' . $ref['new']))); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com karma: Check only unpushed branches: lib/Git/PostReceiveHook.php
Commit:482891ec472c2946c6f51140d3be016d94cbb80c Author:David Soria Parra Wed, 21 Mar 2012 19:53:11 +0100 Parents: c07c79adcbb07fe0ce6a545b6033947a892b5605 Branches: dsp/playground Link: http://git.php.net/?p=karma.git;a=commitdiff;h=482891ec472c2946c6f51140d3be016d94cbb80c Log: Check only unpushed branches Changed paths: M lib/Git/PostReceiveHook.php Diff: 482891ec472c2946c6f51140d3be016d94cbb80c diff --git a/lib/Git/PostReceiveHook.php b/lib/Git/PostReceiveHook.php index 44e4144..26da8c6 100644 --- a/lib/Git/PostReceiveHook.php +++ b/lib/Git/PostReceiveHook.php @@ -93,8 +93,9 @@ class PostReceiveHook extends ReceiveHook } } +$unpushedBranches = array_diff($this->allBranches, $thi->updatedBranches); foreach (array_unique($revisions) as $revision) { -if (!$this->isRevExistsInBranches($revision, $this->allBranches)) { +if (!$this->isRevExistsInBranches($revision, $unpushedBranches)) { $this->sendCommitMail($revision); } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com karma: Check for empty outputs, not for return values: lib/Git/PostReceiveHook.php
Commit:c1cce169b8836c0b4b4c1d43fde38840e8dfb7df Author:David Soria Parra Thu, 22 Mar 2012 07:55:38 +0100 Parents: b9eaafaca29082302885facb1006d8241730d9a4 Branches: dsp/playground Link: http://git.php.net/?p=karma.git;a=commitdiff;h=c1cce169b8836c0b4b4c1d43fde38840e8dfb7df Log: Check for empty outputs, not for return values gitExec doesnt return the return value but the output. Therefore check if the output in isRevInBranches is empty. This indicates that it is not. Changed paths: M lib/Git/PostReceiveHook.php Diff: c1cce169b8836c0b4b4c1d43fde38840e8dfb7df diff --git a/lib/Git/PostReceiveHook.php b/lib/Git/PostReceiveHook.php index e9d9d74..f427a76 100644 --- a/lib/Git/PostReceiveHook.php +++ b/lib/Git/PostReceiveHook.php @@ -453,7 +453,8 @@ class PostReceiveHook extends ReceiveHook * @return bool */ private function isRevExistsInBranches($revision, array $branches) { -return !(bool) \Git::gitExec('rev-list --max-count=1 %s --not %s', escapeshellarg($revision), implode(' ', $this->escapeArrayShellArgs($branches))); +$output = \Git::gitExec('rev-list --max-count=1 %s --not %s', escapeshellarg($revision), implode(' ', $this->escapeArrayShellArgs($branches))); +return !empty($output); } private function getBranchesForRevision($revision) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com karma: Exclude all pushed refs from revchecks: lib/Git/PostReceiveHook.php
Commit:b9eaafaca29082302885facb1006d8241730d9a4 Author:David Soria Parra Thu, 22 Mar 2012 07:54:12 +0100 Parents: 3325644c596ede37db63958c1c88d4f321138f35 Branches: dsp/playground Link: http://git.php.net/?p=karma.git;a=commitdiff;h=b9eaafaca29082302885facb1006d8241730d9a4 Log: Exclude all pushed refs from revchecks Make sure we exclude new branches from checks if a revision is already committed as well. Changed paths: M lib/Git/PostReceiveHook.php Diff: b9eaafaca29082302885facb1006d8241730d9a4 diff --git a/lib/Git/PostReceiveHook.php b/lib/Git/PostReceiveHook.php index 9a380a7..e9d9d74 100644 --- a/lib/Git/PostReceiveHook.php +++ b/lib/Git/PostReceiveHook.php @@ -69,6 +69,7 @@ class PostReceiveHook extends ReceiveHook //cache list of old and updated branches $newBranches = []; +$branches = []; foreach ($this->refs as $ref) { if ($ref['reftype'] == self::REF_BRANCH){ if ($ref['changetype'] == self::TYPE_UPDATED) { @@ -76,6 +77,7 @@ class PostReceiveHook extends ReceiveHook } elseif ($ref['changetype'] == self::TYPE_CREATED) { $newBranches[] = $ref['refname']; } +$branches[] = $ref['refname']; } } @@ -93,7 +95,7 @@ class PostReceiveHook extends ReceiveHook } } -$unpushedBranches = array_diff($this->allBranches, $this->updatedBranches); +$unpushedBranches = array_diff($this->allBranches, $branches); foreach (array_unique($revisions) as $revision) { if (!$this->isRevExistsInBranches($revision, $unpushedBranches)) { $this->sendCommitMail($revision); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com karma: typo fix: lib/Git/PostReceiveHook.php
Commit:3325644c596ede37db63958c1c88d4f321138f35 Author:Florian Anderiasch Wed, 21 Mar 2012 23:05:48 +0100 Committer: David Soria Parra Thu, 22 Mar 2012 08:41:22 +0100 Parents: 482891ec472c2946c6f51140d3be016d94cbb80c Branches: dsp/playground Link: http://git.php.net/?p=karma.git;a=commitdiff;h=3325644c596ede37db63958c1c88d4f321138f35 Log: typo fix Changed paths: M lib/Git/PostReceiveHook.php Diff: 3325644c596ede37db63958c1c88d4f321138f35 diff --git a/lib/Git/PostReceiveHook.php b/lib/Git/PostReceiveHook.php index 26da8c6..9a380a7 100644 --- a/lib/Git/PostReceiveHook.php +++ b/lib/Git/PostReceiveHook.php @@ -93,7 +93,7 @@ class PostReceiveHook extends ReceiveHook } } -$unpushedBranches = array_diff($this->allBranches, $thi->updatedBranches); +$unpushedBranches = array_diff($this->allBranches, $this->updatedBranches); foreach (array_unique($revisions) as $revision) { if (!$this->isRevExistsInBranches($revision, $unpushedBranches)) { $this->sendCommitMail($revision); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php