Skip to content

Undefined database methods - fetch(), etc - commented out in the interface #6954

@herbdool

Description

@herbdool

Description of the bug

There are a bunch of undefined database methods in my IDE: fetch(), fetchObject(), fetchAll(), fetchMode() which were commented out in https://www.drupal.org/node/331213 when they created DatabaseStatementInterface.

In the class description:

  • Some methods in that class are purposefully commented out. Due to a change in
  • how PHP defines PDOStatement, we can't define a signature for those methods
  • that will work the same way between versions older than 5.2.6 and later
  • versions. See http://bugs.php.net/bug.php?id=42452 for more details.

So it seems that since the minimum PHP version is far past 5.2 that these can be uncommented.

I also noticed that the method errorInfo() is undefined where it's called in DatabaseStatementPrefetch so we'll need a "pass-through" to the PDO errorInfo method.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions