Skip to content

Bug #52098 Own PDOStatement implementation ignore __call() #1538

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

Closed
wants to merge 7 commits into from

Conversation

kalaspuffar
Copy link

Tried to solve bug #52098 by adding a fallback so the get_method handler of the class also runs the standard get_method handler and returns the result of this call when a database function could not be found.

@kalaspuffar kalaspuffar changed the title Bug 52098 Bug #52098 Sep 26, 2015
@smalyshev smalyshev added the Bug label Sep 28, 2015
@weltling
Copy link
Contributor

It's TSRMLS_CC when you call it, not TSRMLS_DC.

@kalaspuffar
Copy link
Author

Thanks, I think I would not catch that if I didn't search for it. Will remember it in the future though :)

@kalaspuffar
Copy link
Author

Tested with:

  • DSN sqlite - sqlite memory database
  • DSN mysql - mysql database locally
  • DSN pgsql - postgresql database locally
  • DSN odbc - db2 database locally
  • DSN firebird - firebird database locally
  • DSN oci - oracle database locally
  • DSN dblib - mssql database Amazon EC2

@kalaspuffar kalaspuffar changed the title Bug #52098 Bug #52098 Own PDOStatement implementation ignore __call() Oct 9, 2015
PDO_DBH_DRIVER_METHOD_KIND_STMT TSRMLS_CC)
|| !stmt->dbh->cls_methods[PDO_DBH_DRIVER_METHOD_KIND_STMT]) {

#if PHP_API_VERSION >= 20041225
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be a macro here, nobody remembers which version 20041225 is. Same for other instances.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, because 5.5 is 20121113 and this is the smallest supported PHP version, these checks are not needed there.

Copy link
Author

Choose a reason for hiding this comment

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

Well this #if is found in the function call, so to be sure that the parameter required for my feature is available I thought they where required. But as you say they seem depreciated. I could remove them from the function declaration and call.

@jpauli
Copy link
Member

jpauli commented Mar 21, 2016

merged

@jpauli jpauli closed this Mar 21, 2016
@kalaspuffar kalaspuffar deleted the bug_52098 branch March 22, 2016 09:10
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.

4 participants