Skip to content

Commit 4fc7dc6

Browse files
committed
Merge branch 'master' into str_size_and_int64
* master: (79 commits) ldap_escape() notes Increment version number, since this will be 5.5.6. Added Zend Debugger to the note about the load order (by trash4you at online dot de) Added a LICENSE file to make it easier for PECL binary distributions to conform with the license. Fix Coverity issue reporting wrong sizeof() Fixed bug #65939 (Space before ";" breaks php.ini parsing). (brainstorm at nopcode dot org) exif NEWS add tests for bug #62523 Merged PR #293 (Exif crash on unknown encoding was fixed) By: Draal Conflicts: configure.in main/php_version.h fix bug #65936 (dangling context pointer causes crash) remove TRAVIS check in test source Fixed compilation warning Just SKIP that test on travis Fixed issue #115 (path issue when using phar). fix memory leak on error (from Coverity scan) fix argument type & remove warning fix const warnings in intl methods Fix coverity issue with -1 returned by findOffset not being handled by getPreferredTag fix possibility of access to *storedType without initialization Fix coverity issue with -1 returned by findOffset not being handled by getPreferredTag ... Conflicts: Zend/zend_compile.c ext/intl/collator/collator_create.c ext/intl/locale/locale_methods.c ext/intl/msgformat/msgformat_format.c ext/intl/msgformat/msgformat_parse.c
2 parents f0fdb82 + dfe4b15 commit 4fc7dc6

File tree

126 files changed

+1053
-906
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+1053
-906
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ PHP NEWS
4343
- Openssl:
4444
. Added crypto_method option for the ssl stream context. (Martin Jansen)
4545
. Added certificate fingerprint support. (Tjerk Meesters)
46+
. Added explicit TLSv1.1 and TLSv1.2 stream transports. (Daniel Lowrey)
4647
. Fixed bug #65729 (CN_match gives false positive). (Tjerk Meesters)
4748

4849
- PDO_pgsql:

UPGRADING

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ PHP X.Y UPGRADE NOTES
7979
- Openssl:
8080
Added string openssl_x509_fingerprint($x509, $type, $binary).
8181

82+
- LDAP:
83+
Added ldap_escape($value, $ignore = "", $flags = 0).
84+
8285
========================================
8386
6. New Classes and Interfaces
8487
========================================
@@ -113,6 +116,9 @@ PHP X.Y UPGRADE NOTES
113116
9. New Global Constants
114117
========================================
115118

119+
- LDAP:
120+
LDAP_ESCAPE_FILTER int(1)
121+
LDAP_ESCAPE_DN int(2)
116122

117123
========================================
118124
10. Changes to INI File Handling

Zend/RFCs/003.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ Modified: 2001-09-17
99
1. Background/Need
1010
==================
1111

12-
Many internal function of PHP will reject parameters because of their
12+
Many internal functions of PHP will reject parameters because of their
1313
type (the array and variable function come to mind). For userland
1414
this is not an easy task as there is no uniform way to do it. An
1515
addition to the engine for requiring loose types would allow
16-
delevopers to know that the data passed to their functions is of the
16+
developers to know that the data passed to their functions are of the
1717
correct type and reduce the need for duplicating the same code in
1818
every function to check for the type of data.
1919

@@ -57,7 +57,7 @@ function foo (array $var){
5757
===========
5858

5959
Mis-matches in type should be reported as fatal errors and should halt
60-
the execution of a script as that function can not be run and code
60+
the execution of a script as that function cannot be run and code
6161
following could not reliably run.
6262

6363

Zend/tests/bug65911.phpt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--TEST--
2+
Bug #65911 (scope resolution operator - strange behavior with $this)
3+
--FILE--
4+
<?php
5+
class A {}
6+
7+
class B
8+
{
9+
public function go()
10+
{
11+
$this->foo = 'bar';
12+
echo A::$this->foo; // should not output 'bar'
13+
}
14+
}
15+
16+
$obj = new B();
17+
$obj->go();
18+
?>
19+
--EXPECTF--
20+
Fatal error: Access to undeclared static property: A::$this in %s on line %d

Zend/zend_compile.c

Lines changed: 137 additions & 136 deletions
Large diffs are not rendered by default.

Zend/zend_language_parser.y

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ inner_statement:
271271
statement
272272
| function_declaration_statement
273273
| class_declaration_statement
274-
| T_HALT_COMPILER '(' ')' ';' { zend_error(E_COMPILE_ERROR, "__HALT_COMPILER() can only be used from the outermost scope"); }
274+
| T_HALT_COMPILER '(' ')' ';' { zend_error_noreturn(E_COMPILE_ERROR, "__HALT_COMPILER() can only be used from the outermost scope"); }
275275
;
276276

277277

@@ -1202,7 +1202,7 @@ isset_variables:
12021202

12031203
isset_variable:
12041204
variable { zend_do_isset_or_isempty(ZEND_ISSET, &$$, &$1 TSRMLS_CC); }
1205-
| expr_without_variable { zend_error(E_COMPILE_ERROR, "Cannot use isset() on the result of an expression (you can use \"null !== expression\" instead)"); }
1205+
| expr_without_variable { zend_error_noreturn(E_COMPILE_ERROR, "Cannot use isset() on the result of an expression (you can use \"null !== expression\" instead)"); }
12061206
;
12071207

12081208
class_constant:

Zend/zend_multibyte.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ static size_t dummy_encoding_converter(unsigned char **to, size_t *to_length, co
5353
static int dummy_encoding_list_parser(const char *encoding_list, size_t encoding_list_len, const zend_encoding ***return_list, size_t *return_size, int persistent TSRMLS_DC)
5454
{
5555
*return_list = pemalloc(0, persistent);
56-
return_size = 0;
56+
*return_size = 0;
5757
return SUCCESS;
5858
}
5959

Zend/zend_opcode.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ static void zend_check_finally_breakout(zend_op_array *op_array, zend_uint op_nu
499499
CG(in_compilation) = 1;
500500
CG(active_op_array) = op_array;
501501
CG(zend_lineno) = op_array->opcodes[op_num].lineno;
502-
zend_error(E_COMPILE_ERROR, "jump out of a finally block is disallowed");
502+
zend_error_noreturn(E_COMPILE_ERROR, "jump out of a finally block is disallowed");
503503
}
504504
}
505505
}
@@ -710,7 +710,7 @@ ZEND_API int pass_two(zend_op_array *op_array TSRMLS_DC)
710710
if (op_array->fn_flags & ZEND_ACC_GENERATOR) {
711711
if (opline->op1_type != IS_CONST || Z_TYPE_P(opline->op1.zv) != IS_NULL) {
712712
CG(zend_lineno) = opline->lineno;
713-
zend_error(E_COMPILE_ERROR, "Generators cannot return values using \"return\"");
713+
zend_error_noreturn(E_COMPILE_ERROR, "Generators cannot return values using \"return\"");
714714
}
715715

716716
opline->opcode = ZEND_GENERATOR_RETURN;

ext/bz2/bz2_filter.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ static php_stream_filter_status_t php_bz2_decompress_filter(
9797
status = BZ2_bzDecompressInit(streamp, 0, data->small_footprint);
9898

9999
if (BZ_OK != status) {
100+
php_stream_bucket_delref(bucket TSRMLS_CC);
100101
return PSFS_ERR_FATAL;
101102
}
102103

ext/date/php_date.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,6 +1406,7 @@ PHPAPI signed long php_parse_date(char *string, signed long *now)
14061406

14071407
parsed_time = timelib_strtotime(string, strlen(string), &error, DATE_TIMEZONEDB, php_date_parse_tzfile_wrapper);
14081408
if (error->error_count) {
1409+
timelib_time_dtor(parsed_time);
14091410
timelib_error_container_dtor(error);
14101411
return -1;
14111412
}

0 commit comments

Comments
 (0)