patches/pdo_sqlsrv.ps1
|
(Get-Content config.w32) | ForEach-Object { $_ -replace '/sdl', '' } | Set-Content config.w32 (Get-Content php_pdo_sqlsrv_int.h) | ForEach-Object { $_.Replace('zval_ptr_dtor( &dbh->query_stmt_zval );', "#if PHP_VERSION_ID < 80500`n zval_ptr_dtor( &dbh->query_stmt_zval );`n#else`n OBJ_RELEASE( dbh->query_stmt_obj );`n dbh->query_stmt_obj = NULL;`n#endif") } | Set-Content php_pdo_sqlsrv_int.h (Get-Content pdo_dbh.cpp) | ForEach-Object { $_ -replace 'pdo_error_mode prev_err_mode = dbh->error_mode', 'pdo_error_mode prev_err_mode = static_cast<pdo_error_mode>( dbh->error_mode )' } | Set-Content pdo_dbh.cpp |