diff options
Diffstat (limited to 'shared.patch')
-rw-r--r-- | shared.patch | 54 |
1 files changed, 24 insertions, 30 deletions
diff --git a/shared.patch b/shared.patch index 4090070..9988ea6 100644 --- a/shared.patch +++ b/shared.patch @@ -1,33 +1,27 @@ -diff --git a/source/shared/core_sqlsrv.h b/source/shared/core_sqlsrv.h -index 39e53b1..2d6a357 100644 ---- a/source/shared/core_sqlsrv.h -+++ b/source/shared/core_sqlsrv.h -@@ -2381,10 +2381,7 @@ namespace core { +diff -up shared/core_sqlsrv.h.old shared/core_sqlsrv.h +--- shared/core_sqlsrv.h.old 2019-06-14 14:35:28.803295513 +0200 ++++ shared/core_sqlsrv.h 2019-06-14 14:37:01.829830963 +0200 +@@ -2402,7 +2402,11 @@ namespace core { - inline void sqlsrv_array_init( _Inout_ sqlsrv_context& ctx, _Out_ zval* new_array TSRMLS_DC) + inline void sqlsrv_add_index_zval( _Inout_ sqlsrv_context& ctx, _Inout_ zval* array, _In_ zend_ulong index, _In_ zval* value TSRMLS_DC) { -- int zr = ::array_init(new_array); -- CHECK_ZEND_ERROR( zr, ctx, SQLSRV_ERROR_ZEND_HASH ) { -- throw CoreException(); -- } -+ array_init(new_array); - } ++#ifdef add_index_zval ++ int zr = add_index_zval( array, index, value ); ++#else + int zr = ::add_index_zval( array, index, value ); ++#endif + CHECK_ZEND_ERROR( zr, ctx, SQLSRV_ERROR_ZEND_HASH ) { + throw CoreException(); + } +@@ -2410,7 +2414,11 @@ namespace core { - inline void sqlsrv_php_stream_from_zval_no_verify( _Inout_ sqlsrv_context& ctx, _Outref_result_maybenull_ php_stream*& stream, _In_opt_ zval* stream_z TSRMLS_DC ) -diff --git a/source/shared/core_util.cpp b/source/shared/core_util.cpp -index c537f76..1f6af42 100644 ---- a/source/shared/core_util.cpp -+++ b/source/shared/core_util.cpp -@@ -353,10 +353,10 @@ void die( _In_opt_ const char* msg, ... ) - DWORD rc = FormatMessage( FORMAT_MESSAGE_FROM_STRING, msg, 0, 0, last_err_msg, sizeof( last_err_msg ), &format_args ); - va_end( format_args ); - if( rc == 0 ) { -- php_error( E_ERROR, reinterpret_cast<const char*>( INTERNAL_FORMAT_ERROR )); -+ php_error( E_ERROR, "%s", reinterpret_cast<const char*>( INTERNAL_FORMAT_ERROR )); - } - -- php_error( E_ERROR, last_err_msg ); -+ php_error( E_ERROR, "%s", last_err_msg ); - } - - namespace { + inline void sqlsrv_add_next_index_zval( _Inout_ sqlsrv_context& ctx, _Inout_ zval* array, _In_ zval* value TSRMLS_DC) + { ++#ifdef add_next_index_zval ++ int zr = add_next_index_zval( array, value ); ++#else + int zr = ::add_next_index_zval( array, value ); ++#endif + CHECK_ZEND_ERROR( zr, ctx, SQLSRV_ERROR_ZEND_HASH ) { + throw CoreException(); + } |