Skip to content

Trim trailing whitespace #15649

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/release-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ slightly different steps. We'll call attention where the steps differ.
```shell
git add -p
git commit --gpg-sign=YOURKEYID -m "[ci skip] Update NEWS for PHP X.Y.Z alpha2"
```
```

🔷 **For post-GA releases only,** switch back to the *version branch* for
your release (e.g., `PHP-8.2`) and bump the version numbers in
Expand Down
2 changes: 1 addition & 1 deletion ext/dom/parentnode/css_selectors.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ static lxb_css_selector_list_t *dom_parse_selector(
php_dom_throw_error_with_message(SYNTAX_ERR, "Invalid selector", true);
}
}

return list;
}

Expand Down
12 changes: 6 additions & 6 deletions ext/pdo_firebird/firebird_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ static int php_firebird_preprocess(const zend_string* sql, char* sql_out, HashTa
/* set coercing a data type */
static void set_coercing_output_data_types(XSQLDA* sqlda)
{
/* Data types introduced in Firebird 4.0 are difficult to process using the Firebird Legacy API. */
/* Data types introduced in Firebird 4.0 are difficult to process using the Firebird Legacy API. */
/* These data types include DECFLOAT(16), DECFLOAT(34), INT128 (NUMERIC/DECIMAL(38, x)). */
/* In any case, at this data types can only be mapped to strings. */
/* This function allows you to ensure minimal performance of queries if they contain columns of the above types. */
Expand All @@ -477,7 +477,7 @@ static void set_coercing_output_data_types(XSQLDA* sqlda)
unsigned fb_client_major_version = (fb_client_version >> 8) & 0xFF;
for (i=0, var = sqlda->sqlvar; i < sqlda->sqld; i++, var++) {
dtype = (var->sqltype & ~1); /* drop flag bit */
nullable = (var->sqltype & 1);
nullable = (var->sqltype & 1);
switch(dtype) {
case SQL_INT128:
var->sqltype = SQL_VARYING + nullable;
Expand All @@ -497,7 +497,7 @@ static void set_coercing_output_data_types(XSQLDA* sqlda)

case SQL_TIMESTAMP_TZ:
if (fb_client_major_version < 4) {
/* If the client version is below 4.0, then it is impossible to handle time zones natively, */
/* If the client version is below 4.0, then it is impossible to handle time zones natively, */
/* so we convert these types to a string. */
var->sqltype = SQL_VARYING + nullable;
var->sqllen = 58;
Expand All @@ -506,8 +506,8 @@ static void set_coercing_output_data_types(XSQLDA* sqlda)

case SQL_TIME_TZ:
if (fb_client_major_version < 4) {
/* If the client version is below 4.0, then it is impossible to handle time zones natively, */
/* so we convert these types to a string. */
/* If the client version is below 4.0, then it is impossible to handle time zones natively, */
/* so we convert these types to a string. */
var->sqltype = SQL_VARYING + nullable;
var->sqllen = 46;
}
Expand All @@ -516,7 +516,7 @@ static void set_coercing_output_data_types(XSQLDA* sqlda)
default:
break;
}
}
}
}
#endif

Expand Down
12 changes: 6 additions & 6 deletions ext/pdo_firebird/firebird_statement.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ static int get_formatted_time_tz(pdo_stmt_t *stmt, const ISC_TIME_TZ* timeTz, zv
unsigned hours = 0, minutes = 0, seconds = 0, fractions = 0;
char timeZoneBuffer[40] = {0};
char *fmt;
struct tm t;
struct tm t;
ISC_TIME time;
char timeBuf[80] = {0};
char timeTzBuf[124] = {0};
Expand All @@ -94,7 +94,7 @@ static int get_formatted_time_tz(pdo_stmt_t *stmt, const ISC_TIME_TZ* timeTz, zv
time = fb_encode_time(hours, minutes, seconds, fractions);
isc_decode_sql_time(&time, &t);
fmt = S->H->time_format ? S->H->time_format : PDO_FB_DEF_TIME_FMT;

size_t len = strftime(timeBuf, sizeof(timeBuf), fmt, &t);
if (len == 0) {
return 1;
Expand All @@ -112,7 +112,7 @@ static int get_formatted_timestamp_tz(pdo_stmt_t *stmt, const ISC_TIMESTAMP_TZ*
unsigned year, month, day, hours, minutes, seconds, fractions;
char timeZoneBuffer[40] = {0};
char *fmt;
struct tm t;
struct tm t;
ISC_TIMESTAMP ts;
char timestampBuf[80] = {0};
char timestampTzBuf[124] = {0};
Expand All @@ -124,7 +124,7 @@ static int get_formatted_timestamp_tz(pdo_stmt_t *stmt, const ISC_TIMESTAMP_TZ*
isc_decode_timestamp(&ts, &t);

fmt = S->H->timestamp_format ? S->H->timestamp_format : PDO_FB_DEF_TIMESTAMP_FMT;

size_t len = strftime(timestampBuf, sizeof(timestampBuf), fmt, &t);
if (len == 0) {
return 1;
Expand Down Expand Up @@ -563,7 +563,7 @@ static int pdo_firebird_stmt_get_col(
size_t len = strftime(buf, sizeof(buf), fmt, &t);
ZVAL_STRINGL(result, buf, len);
break;
#if FB_API_VER >= 40
#if FB_API_VER >= 40
case SQL_TIME_TZ: {
ISC_TIME_TZ time = php_get_isc_time_tz_from_sqldata(var->sqldata);
return get_formatted_time_tz(stmt, &time, result);
Expand All @@ -572,7 +572,7 @@ static int pdo_firebird_stmt_get_col(
ISC_TIMESTAMP_TZ ts = php_get_isc_timestamp_tz_from_sqldata(var->sqldata);
return get_formatted_timestamp_tz(stmt, &ts, result);
}
#endif
#endif
case SQL_BLOB: {
ISC_QUAD quad = php_get_isc_quad_from_sqldata(var->sqldata);
return php_firebird_fetch_blob(stmt, colno, result, &quad);
Expand Down
8 changes: 4 additions & 4 deletions ext/pdo_firebird/pdo_firebird_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ extern "C" unsigned fb_get_client_version(void)
{
Firebird::IMaster* master = Firebird::fb_get_master_interface();
Firebird::IUtil* util = master->getUtilInterface();
return util->getClientVersion();
return util->getClientVersion();
}

extern "C" ISC_TIME fb_encode_time(unsigned hours, unsigned minutes, unsigned seconds, unsigned fractions)
Expand All @@ -53,7 +53,7 @@ extern "C" ISC_DATE fb_encode_date(unsigned year, unsigned month, unsigned day)
#if FB_API_VER >= 40

/* Decodes a time with time zone into its time components. */
extern "C" ISC_STATUS fb_decode_time_tz(ISC_STATUS* isc_status, const ISC_TIME_TZ* timeTz, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions,
extern "C" ISC_STATUS fb_decode_time_tz(ISC_STATUS* isc_status, const ISC_TIME_TZ* timeTz, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions,
unsigned timeZoneBufferLength, char* timeZoneBuffer)
{
Firebird::IMaster* master = Firebird::fb_get_master_interface();
Expand All @@ -70,9 +70,9 @@ extern "C" ISC_STATUS fb_decode_time_tz(ISC_STATUS* isc_status, const ISC_TIME_T
}

/* Decodes a timestamp with time zone into its date and time components */
extern "C" ISC_STATUS fb_decode_timestamp_tz(ISC_STATUS* isc_status, const ISC_TIMESTAMP_TZ* timestampTz,
extern "C" ISC_STATUS fb_decode_timestamp_tz(ISC_STATUS* isc_status, const ISC_TIMESTAMP_TZ* timestampTz,
unsigned* year, unsigned* month, unsigned* day,
unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions,
unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions,
unsigned timeZoneBufferLength, char* timeZoneBuffer)
{
Firebird::IMaster* master = Firebird::fb_get_master_interface();
Expand Down
8 changes: 4 additions & 4 deletions ext/pdo_firebird/pdo_firebird_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ ISC_DATE fb_encode_date(unsigned year, unsigned month, unsigned day);

#if FB_API_VER >= 40

ISC_STATUS fb_decode_time_tz(ISC_STATUS* isc_status, const ISC_TIME_TZ* timeTz, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions,
ISC_STATUS fb_decode_time_tz(ISC_STATUS* isc_status, const ISC_TIME_TZ* timeTz, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions,
unsigned timeZoneBufferLength, char* timeZoneBuffer);

ISC_STATUS fb_decode_timestamp_tz(ISC_STATUS* isc_status, const ISC_TIMESTAMP_TZ* timestampTz,
ISC_STATUS fb_decode_timestamp_tz(ISC_STATUS* isc_status, const ISC_TIMESTAMP_TZ* timestampTz,
unsigned* year, unsigned* month, unsigned* day,
unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions,
unsigned timeZoneBufferLength, char* timeZoneBuffer);
unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions,
unsigned timeZoneBufferLength, char* timeZoneBuffer);

#endif

Expand Down