summaryrefslogtreecommitdiff
path: root/ext/phar
diff options
context:
space:
mode:
Diffstat (limited to 'ext/phar')
-rw-r--r--ext/phar/phar.c8
-rwxr-xr-xext/phar/phar_object.c8
-rw-r--r--ext/phar/stream.c2
-rw-r--r--ext/phar/tests/phpinfo_001.phpt4
-rw-r--r--ext/phar/tests/phpinfo_002.phpt2
-rw-r--r--ext/phar/tests/phpinfo_003.phpt2
-rw-r--r--ext/phar/tests/phpinfo_004.phpt4
7 files changed, 17 insertions, 13 deletions
diff --git a/ext/phar/phar.c b/ext/phar/phar.c
index 4bdf6199c..bccc32ebe 100644
--- a/ext/phar/phar.c
+++ b/ext/phar/phar.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: phar.c 298908 2010-05-03 14:41:40Z iliaa $ */
+/* $Id: phar.c 305584 2010-11-20 20:59:28Z kalle $ */
#define PHAR_MAIN 1
#include "phar_internal.h"
@@ -512,7 +512,7 @@ void phar_entry_remove(phar_entry_data *idata, char **error TSRMLS_DC) /* {{{ */
(buffer) += 2
#else
# define PHAR_GET_32(buffer, var) \
- var = *(php_uint32*)(buffer); \
+ memcpy(&var, buffer, sizeof(var)); \
buffer += 4
# define PHAR_GET_16(buffer, var) \
var = *(php_uint16*)(buffer); \
@@ -2491,7 +2491,7 @@ static inline void phar_set_32(char *buffer, int var) /* {{{ */
*((buffer) + 1) = (unsigned char) (((var) >> 8) & 0xFF);
*((buffer) + 0) = (unsigned char) ((var) & 0xFF);
#else
- *(php_uint32 *)(buffer) = (php_uint32)(var);
+ memcpy(buffer, &var, sizeof(var));
#endif
} /* }}} */
@@ -3668,7 +3668,7 @@ PHP_MINFO_FUNCTION(phar) /* {{{ */
php_info_print_table_header(2, "Phar: PHP Archive support", "enabled");
php_info_print_table_row(2, "Phar EXT version", PHP_PHAR_VERSION);
php_info_print_table_row(2, "Phar API version", PHP_PHAR_API_VERSION);
- php_info_print_table_row(2, "SVN revision", "$Revision: 298908 $");
+ php_info_print_table_row(2, "SVN revision", "$Revision: 305584 $");
php_info_print_table_row(2, "Phar-based phar archives", "enabled");
php_info_print_table_row(2, "Tar-based phar archives", "enabled");
php_info_print_table_row(2, "ZIP-based phar archives", "enabled");
diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c
index e7ee3e72f..89a84a2eb 100755
--- a/ext/phar/phar_object.c
+++ b/ext/phar/phar_object.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: phar_object.c 298642 2010-04-27 08:23:25Z bjori $ */
+/* $Id: phar_object.c 303709 2010-09-23 04:41:14Z aharvey $ */
#include "phar_internal.h"
#include "func_interceptors.h"
@@ -1251,8 +1251,12 @@ static spl_other_handler phar_spl_foreign_handler = {
/* {{{ proto void Phar::__construct(string fname [, int flags [, string alias]])
* Construct a Phar archive object
- * {{{ proto void PharData::__construct(string fname [[, int flags [, string alias]], int file format = Phar::TAR])
+ *
+ * proto void PharData::__construct(string fname [[, int flags [, string alias]], int file format = Phar::TAR])
* Construct a PharData archive object
+ *
+ * This function is used as the constructor for both the Phar and PharData
+ * classes, hence the two prototypes above.
*/
PHP_METHOD(Phar, __construct)
{
diff --git a/ext/phar/stream.c b/ext/phar/stream.c
index 2b91e8df2..1fbbbb1b5 100644
--- a/ext/phar/stream.c
+++ b/ext/phar/stream.c
@@ -470,7 +470,7 @@ static int phar_stream_flush(php_stream *stream TSRMLS_DC) /* {{{ */
if (stream->mode[0] == 'w' || (stream->mode[0] == 'r' && stream->mode[1] == '+')) {
ret = phar_flush(((phar_entry_data *)stream->abstract)->phar, 0, 0, 0, &error TSRMLS_CC);
if (error) {
- php_stream_wrapper_log_error(stream->wrapper, REPORT_ERRORS TSRMLS_CC, error);
+ php_stream_wrapper_log_error(stream->wrapper, REPORT_ERRORS TSRMLS_CC, "%s", error);
efree(error);
}
return ret;
diff --git a/ext/phar/tests/phpinfo_001.phpt b/ext/phar/tests/phpinfo_001.phpt
index e81ed71ac..5de74dac0 100644
--- a/ext/phar/tests/phpinfo_001.phpt
+++ b/ext/phar/tests/phpinfo_001.phpt
@@ -26,7 +26,7 @@ phpinfo(INFO_MODULES);
Phar: PHP Archive support => enabled
Phar EXT version => %s
Phar API version => 1.1.1
-CVS revision => %sRevision: %s $
+SVN revision => %sRevision: %s $
Phar-based phar archives => enabled
Tar-based phar archives => enabled
ZIP-based phar archives => enabled
@@ -48,7 +48,7 @@ Phar
Phar: PHP Archive support => enabled
Phar EXT version => %s
Phar API version => 1.1.1
-CVS revision => %sRevision: %s $
+SVN revision => %sRevision: %s $
Phar-based phar archives => enabled
Tar-based phar archives => enabled
ZIP-based phar archives => enabled
diff --git a/ext/phar/tests/phpinfo_002.phpt b/ext/phar/tests/phpinfo_002.phpt
index a9a73cd92..da6db9571 100644
--- a/ext/phar/tests/phpinfo_002.phpt
+++ b/ext/phar/tests/phpinfo_002.phpt
@@ -24,7 +24,7 @@ Phar
Phar: PHP Archive support => enabled
Phar EXT version => %s
Phar API version => 1.1.1
-CVS revision => %sRevision: %s $
+SVN revision => %sRevision: %s $
Phar-based phar archives => enabled
Tar-based phar archives => enabled
ZIP-based phar archives => enabled
diff --git a/ext/phar/tests/phpinfo_003.phpt b/ext/phar/tests/phpinfo_003.phpt
index 04602d22a..031d3cf49 100644
--- a/ext/phar/tests/phpinfo_003.phpt
+++ b/ext/phar/tests/phpinfo_003.phpt
@@ -24,7 +24,7 @@ Phar
Phar: PHP Archive support => enabled
Phar EXT version => %s
Phar API version => 1.1.1
-CVS revision => %cRevision: %s $
+SVN revision => %cRevision: %s $
Phar-based phar archives => enabled
Tar-based phar archives => enabled
ZIP-based phar archives => enabled
diff --git a/ext/phar/tests/phpinfo_004.phpt b/ext/phar/tests/phpinfo_004.phpt
index 33b0e7b0b..c49205c14 100644
--- a/ext/phar/tests/phpinfo_004.phpt
+++ b/ext/phar/tests/phpinfo_004.phpt
@@ -29,7 +29,7 @@ phpinfo(INFO_MODULES);
<tr class="h"><th>Phar: PHP Archive support</th><th>enabled</th></tr>
<tr><td class="e">Phar EXT version </td><td class="v">%s </td></tr>
<tr><td class="e">Phar API version </td><td class="v">1.1.1 </td></tr>
-<tr><td class="e">CVS revision </td><td class="v">%sRevision: %s $ </td></tr>
+<tr><td class="e">SVN revision </td><td class="v">%sRevision: %s $ </td></tr>
<tr><td class="e">Phar-based phar archives </td><td class="v">enabled </td></tr>
<tr><td class="e">Tar-based phar archives </td><td class="v">enabled </td></tr>
<tr><td class="e">ZIP-based phar archives </td><td class="v">enabled </td></tr>
@@ -53,7 +53,7 @@ Phar based on pear/PHP_Archive, original concept by Davey Shafik.<br />Phar full
<tr class="h"><th>Phar: PHP Archive support</th><th>enabled</th></tr>
<tr><td class="e">Phar EXT version </td><td class="v">%s </td></tr>
<tr><td class="e">Phar API version </td><td class="v">1.1.1 </td></tr>
-<tr><td class="e">CVS revision </td><td class="v">%sRevision: %s $ </td></tr>
+<tr><td class="e">SVN revision </td><td class="v">%sRevision: %s $ </td></tr>
<tr><td class="e">Phar-based phar archives </td><td class="v">enabled </td></tr>
<tr><td class="e">Tar-based phar archives </td><td class="v">enabled </td></tr>
<tr><td class="e">ZIP-based phar archives </td><td class="v">enabled </td></tr>