-
Notifications
You must be signed in to change notification settings - Fork 8k
pg_fetch_object() with abstract classes #20180
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
base: PHP-8.3
Are you sure you want to change the base?
Conversation
4755ad0
to
7726761
Compare
…ntiable class name
4db2580
to
dc642e8
Compare
@devnexen do you know why Windows fails, it says there is an issue with the CLEAN section of the test |
I have no real idea honestly. |
} catch(Throwable $e) { | ||
echo $e::class, ': ', $e->getMessage(), PHP_EOL; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: would it be possible to add the closing tag ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might also be the reason windows is confused
$result = pg_query($db, $sql); | ||
var_dump(pg_fetch_object($result, NULL, 'E')); | ||
} catch(Throwable $e) { | ||
echo $e::class, ': ', $e->getMessage(), PHP_EOL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe try without this last PHP_EOL wdyt ?
|
||
ZVAL_COPY_VALUE(&dataset, return_value); | ||
object_init_ex(return_value, ce); | ||
if (UNEXPECTED(EG(exception))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check the return value of object_init_ex instead
object_init_ex(return_value, ce); | ||
if (UNEXPECTED(EG(exception))) { | ||
zval_ptr_dtor(&dataset); | ||
zval_ptr_dtor(return_value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drop this line , zval_ptr_dtor of the return value followed by a return statement is always wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, zval_ptr_dtor(&dataset); should also be dropped as dataset is a borrow of the return value.
No description provided.