Skip to content

Conversation

@madorin
Copy link
Contributor

@madorin madorin commented Jan 5, 2017

More info here: https://bugs.php.net/bug.php?id=72583
Related test attached.

@krakjoe krakjoe added the Bug label Jan 5, 2017
*(zend_long *)*ptr = *(ISC_LONG*)var->sqldata;
break;
case SQL_INT64:
#if SIZEOF_ZEND_LONG >= 8
Copy link
Member

@krakjoe krakjoe Jan 5, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this #if should not be indented, place # at column one please.

*len = sizeof(zend_long);
*ptr = FETCH_BUF(S->fetch_buf[colno], zend_long, 1, NULL);
*(zend_long *)*ptr = *(ISC_INT64*)var->sqldata;
#else
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this #else should not be indented, place # at column one please.

#else
*ptr = FETCH_BUF(S->fetch_buf[colno], char, CHAR_BUF_LEN, NULL);
*len = slprintf(*ptr, CHAR_BUF_LEN, "%" LL_MASK "d", *(ISC_INT64*)var->sqldata);
#endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this #endif should not be indented, place # at column one please.

switch (var->sqltype & ~1) {
case SQL_SHORT:
case SQL_LONG:
#if SIZEOF_ZEND_LONG >= 8
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this #if should not be indented, place # at column one please.

case SQL_LONG:
#if SIZEOF_ZEND_LONG >= 8
case SQL_INT64:
#endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this #endif should not be indented, place # at column one please.

@madorin
Copy link
Contributor Author

madorin commented Jan 6, 2017

Adjusted conditional directives to match coding standards. Able to merge in master & 7.x branches.

$S = $C->prepare('select aint, asmi from atable');
$S->execute();
$D = $S->fetch(PDO::FETCH_NUM);
echo gettype($D[0]).PHP_EOL.gettype($D[1]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PHP_EOL will produce different output, if the test is run on a Apache SAPI. It's better to use "\n" or just var_dump().

@weltling
Copy link
Contributor

weltling commented Jan 6, 2017

Merged as 826122f.

Thanks!

@weltling weltling closed this Jan 6, 2017
@krakjoe
Copy link
Member

krakjoe commented Jan 6, 2017

For reference: after merge discussion here about easing bc: http://externals.io/thread/591

@madorin madorin deleted the fb_native branch January 9, 2017 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants