Skip to content
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

Wrong typing for AutoExecute #915

Closed
davidsneighbour opened this issue Jan 3, 2023 · 1 comment
Closed

Wrong typing for AutoExecute #915

davidsneighbour opened this issue Jan 3, 2023 · 1 comment
Labels
code cleanup core ADOdb core (library and base classes)
Milestone

Comments

@davidsneighbour
Copy link

function AutoExecute(
    mixed $table,
    mixed $fields_values,
    string $mode = "INSERT",
    bool $where = false,
    bool $forceUpdate = true,
    bool $magic_quotes = false
): bool

$where should be string|false or maybe even string $where = '' instead.

https://github.com/ADOdb/ADOdb/blob/master/adodb.inc.php#L2610

@dregad dregad added bug core ADOdb core (library and base classes) labels Jan 4, 2023
@dregad dregad added this to the v5.22.5 milestone Jan 4, 2023
@dregad dregad added code cleanup and removed bug labels Jan 17, 2023
dregad added a commit that referenced this issue Jan 17, 2023
$where was wrongly typed as bool. Changed it to string and updated
the default value from false to ''.

Fixes #915
@dregad dregad closed this as completed Jan 17, 2023
@dregad
Copy link
Member

dregad commented Jan 17, 2023

Thanks for the heads up.

Note: only PHPDoc has been updated for now, proper type hints will be added at a later time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code cleanup core ADOdb core (library and base classes)
Projects
None yet
Development

No branches or pull requests

2 participants