Anatol Belski [Sun, 14 Aug 2016 17:33:24 +0000 (19:33 +0200)]
Fixed bug #72759 Regression in pgo_pgsql
This is caused by the fix for #72633. Namely, lastval() throws an error,
if no nextval() was called earlier in the same session. This is by all
means correct so far, however inside a transaction it leads to an abort.
This is the opposite to MySQL's last_insert_id() which doesn't produce
any error no matter something were autoincremented or not.
To avoid existing scripts breakage in the stable branches, the previous
patch is extended to revert the transaction to the state before the lastval()
call in case of error. It is done only for 5.6 and 7.0 to retain BC. For 7.1+,
the clean behavior should persist. This is already the current behavior, when
the sequence name is explicitly passed. So there's no reason to obfuscate the
errors where this breakage is valid.
Benedict Singer [Wed, 10 Aug 2016 14:03:12 +0000 (15:03 +0100)]
Bug 70195
Many FTP-S servers now require FTP clients to re-use the SSL session
from the control connection on the data connection, to prove that the
same entity controls both connections. This patch updates PHP's FTP-S
client code to allow that possibility.
Fix #72278: getimagesize returning FALSE on valid jpg
getimagesize() is rather strict about the length of the marker payload data,
and fails if there are extraneous bytes before the next marker. Only a very
special case reported in bug #13213 is catered to.
libjpeg is rather resilient to such corrupted JPEG files, and raises a
recoverable error in this case. Other image processors also accept such
JPEG files, so we adapt getimagesize() to skip (but warn about) such
extraneous bytes.
Fix #60665: call to empty() on NULL result using PDO::FETCH_LAZY returns false
The has_property handler only checked whether a respective column name
exists, but neither whether the column value is set, nor whether it is
empty, respectively. We fix that to match the behavior of POD:FETCH_OBJ in
particular and PHP in general.
Anatol Belski [Thu, 11 Aug 2016 12:49:18 +0000 (14:49 +0200)]
Merge branch 'PHP-7.1'
* PHP-7.1:
add missing chunk to support mb path in symlink()
pull ps_title behind the logic to support the current codepage
fix typo
add missing mb path support chunk
Xinchen Hui [Thu, 11 Aug 2016 11:58:02 +0000 (19:58 +0800)]
Merge branch 'master' of git.php.net:/php-src
* 'master' of git.php.net:/php-src:
ReflectionType improvements
Fix #72810. Add check for SKIP_ONLINE_TESTS
msql > mysqli, use a better extension name as an example in php.ini, as we do not have msql support anymore (Sorry Rasmus!)
Remove sql.safe_mode
Xinchen Hui [Thu, 11 Aug 2016 03:34:56 +0000 (11:34 +0800)]
Merge branch 'intrinsics_backport' of https://github.com/TazeTSchnitzel/php-src
* 'intrinsics_backport' of https://github.com/TazeTSchnitzel/php-src:
Use checked add/sub intrinsics instead of asm for ++ and --
Use checked arithmetic intrinsics instead of asm, when possible
This is one of the last old and odd deprecated settings we still have in PHP, it was never fully implemented in all the database extensions and should probably have been gone back in 5.4, along with safe_mode. Although if my memory strikes me right, mysql was also supporting it back then, but not mysqli.
So far only interbase was supporting this feature, and the removal of it causes two effects for interbase:
- CREATE DATABASE is now allowed no matter
- The default database set by php.ini (ibase.default_db) is no longer forced
Get rid of these slow calls to LoadLibrary()/GetProcAddress() calls on Windows, we require Windows Vista as bare minimum for PHP anyway, so it does not make any sense to do this slow emulation anyway.
GD:
- PrintWindow() is available as of Windows XP, it requires linking to User32.lib, which config.w32 for ext/gd already.
CLI:
- The borrowed functions from PostgreSQL to set the titles of the console window uses SetConsoleTitle() and GetConsoleTitle(), both are available as of Windows 2000 from Kernel32.lib which we already are linking against.
Standard:
- The disk space utility functions uses GetDiskFreeSpaceExA() which is available as of Windows XP, again links to Kernel32.lib.
- The symlink() PHP function uses CreateSymbolicLinkA() which is available from Windows Vista, again from Kernel32.lib.
- php_get_windows_name() in info.c uses GetNativeSystemInfo() which is available as of Windows XP and GetProductInfo() which is available as of Windows Vista, both are again from Kernel32.lib.
Notes:
- ext/interbase & ext/pdo_firebird uses GetProcAddress(), I'm not entirely sure how to handle this one.
- ext/sqlite3, this is apart of the bundled libsqlite3, I don't really wanna play around with our bundled libs and make it a bigger issue for those who maintain and upgrade them.
- ext/readline, the call to GetProcAddress() here does not do any system calls, so it is left as is.
- win32/ioutil.c uses GetProcAddress(), but the function it attempts to load (PathCchCanonicalizeEx()) is only available from Windows 8 and greater (Pathcch.lib linkage).
- win32/time.c uses GetSystemTimePreciseAsFileTime() which is available from Windows 8 and greater to get the current system date and time which the highest possible precision and falls back to GetSystemTimeAsFileTime() (available as of Windows 2000), again Kernel32.lib, the GetSystemTimePreciseAsFileTime() is left in a GetProcAddress().