com php-src: Merge branch 'PHP-5.6' into PHP-7.0: NEWS ext/sqlite3/sqlite3.c
| From: | Christoph Michael Becker | Date: | Wed, 27 Jul 2016 14:48:29 +0000 |
| Subject: | com php-src: Merge branch 'PHP-5.6' into PHP-7.0: NEWS ext/sqlite3/sqlite3.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-93417@lists.php.net to get a copy of this message | ||
Commit: 23c359c27614a8b30afd860f2543912d1b297d08
Author: Christoph M. Becker <cmb@php.net> Wed, 27 Jul 2016 16:47:09 +0200
Parents: 0d2c4f822c614c544df736a30dffc00104fdbd57 cc125f277b50e0f90fc8033fe7f47d2446389a15
Branches: PHP-7.0 PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=23c359c27614a8b30afd860f2543912d1b297d08
Log:
Merge branch 'PHP-5.6' into PHP-7.0
# Resolved conflicts:
# ext/sqlite3/sqlite3.c
Changed paths:
MM NEWS
MM ext/sqlite3/sqlite3.c
Diff:
diff --cc NEWS
index 241dcad,bd65b76..abfb573
--- a/NEWS
+++ b/NEWS
@@@ -65,29 -50,7 +65,31 @@@ PH
. Fixed bug #72222 (ReflectionClass::export doesn't handle array constants).
(Nikita Nefedov)
+- SimpleXML:
+ . Fixed bug #72588 (Using global var doesn't work while accessing SimpleXML
+ element).. (Laruence)
+
+- SPL:
+ . Fixed bug #55701 (GlobIterator throws LogicException). (Valentin VĂLCIU)
+ . Fixed bug #72646 (SplFileObject::getCsvControl does not return the escape
+ character). (cmb)
+
+- SQLite3:
+ . Fixed bug #72668 (Spurious warning when exception is thrown in user defined
+ function). (Laruence)
+ . Fixed bug #72571 (SQLite3::bindValue, SQLite3::bindParam crash). (Laruence)
++ . Implemented FR #72653 (SQLite should allow opening with empty filename).
++ (cmb)
+
- Standard:
+ . Fixed bug #72622 (array_walk + array_replace_recursive create references
+ from nothing). (Laruence)
+ . Fixed bug #72152 (base64_decode $strict fails to detect null byte).
+ (Lauri Kenttä)
+ . Fixed bug #72263 (base64_decode skips a character after padding in strict
+ mode). (Lauri Kenttä)
+ . Fixed bug #72264 (base64_decode $strict fails with whitespace between
+ padding). (Lauri Kenttä)
. Fixed bug #72330 (CSV fields incorrectly split if escape char followed by
UTF chars). (cmb)
diff --cc ext/sqlite3/sqlite3.c
index 2cb6a52,54ec73d..9c14dab
--- a/ext/sqlite3/sqlite3.c
+++ b/ext/sqlite3/sqlite3.c
@@@ -110,17 -114,17 +110,15 @@@ PHP_METHOD(sqlite3, open
return;
}
- zend_restore_error_handling(&error_handling TSRMLS_CC);
-
if (db_obj->initialised) {
- zend_throw_exception(zend_exception_get_default(TSRMLS_C), "Already initialised DB
Object", 0 TSRMLS_CC);
+ zend_throw_exception(zend_ce_exception, "Already initialised DB Object", 0);
- }
-
- if (strlen(filename) != filename_len) {
return;
}
- if (filename_len != sizeof(":memory:")-1 ||
- memcmp(filename, ":memory:", sizeof(":memory:")-1) != 0) {
+
+ if (filename_len != 0 && (filename_len != sizeof(":memory:")-1 ||
+ memcmp(filename, ":memory:", sizeof(":memory:")-1) != 0)) {
- if (!(fullpath = expand_filepath(filename, NULL TSRMLS_CC))) {
- zend_throw_exception(zend_exception_get_default(TSRMLS_C), "Unable to expand
filepath", 0 TSRMLS_CC);
+ if (!(fullpath = expand_filepath(filename, NULL))) {
+ zend_throw_exception(zend_ce_exception, "Unable to expand filepath", 0);
return;
}
@@@ -146,8 -151,8 +145,8 @@@
#else
if (sqlite3_open(fullpath, &(db_obj->db)) != SQLITE_OK) {
#endif
- zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C), 0 TSRMLS_CC, "Unable to open
database: %s", sqlite3_errmsg(db_obj->db));
+ zend_throw_exception_ex(zend_ce_exception, 0, "Unable to open database: %s",
sqlite3_errmsg(db_obj->db));
- if (fullpath) {
+ if (fullpath != filename) {
efree(fullpath);
}
return;