-
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
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 ?
dc642e8
to
c48266c
Compare
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.
I did not test this myself, but the code changes look good.
I don't think you need all those CE variants (i.e. interface, enum, ...) for the test, but it doesn't hurt.
I mainly wanted them to check the error messages, but they indeed can't hurt (especially considering how poorly tested ext/pgsql is) |
This shouldn't really be happening in the first place
include('config.inc'); | ||
$db = pg_connect($conn_str); | ||
pg_query($db, "DROP TABLE IF EXISTS pg_fetch_object_abstract_class cascade"); | ||
$db = @pg_connect($conn_str); |
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.
This issue really weirds me out. would it be possible to do the cleaning somewhere in the file section instead just for testing once at least ?
So it fails because the CLEAN section somehow outputs " \r\n" and that's not equal to the empty string so it borks. I don't know what produces these whitespace characters. Pushing some more debugging code... |
Will continue debugging this later ig. The simple fix is just get rid of the clean section and do the table deletion in the FILE section, that's how the other tests do it. |
No description provided.