0
/**
     * A statement class that implements DB_IStatement_1
     * NOTE: in most cases, you should be type-hinting for DB_IStatement_1
     * @author Andrew Minerd <andrew.minerd@sellingsource.com>
     */
    class DB_Statement_1 extends PDOStatement implements DB_IStatement_1
    {

    }

i am getting following error . 
Strict Standards: Declaration of DB_Statement_1::execute() should be compatible with PDOStatement::execute($bound_input_params = NULL) in /virtualhosts/libolution/DB/Statement.1.php on line 12

Strict Standards: Declaration of DB_Statement_1::fetch() should be compatible with PDOStatement::fetch($how = NULL, $orientation = NULL, $offset = NULL) in /virtualhosts/libolution/DB/Statement.1.php on line 12.

Line # 12 is mentioned above.
**

**

2
Contributors
1
Reply
15
Views
9 Months
Discussion Span
Last Post by cereal
0

Hi,

change the DB_IStatement_1 signature for the execute() and fetch() methods and it should work fine. In practice you are implementing the PDOStatement interface into your class, so you must declare the same arguments:

public function execute($params = []);
public function fetch($how = NULL, $orientation = NULL, $offset = NULL);

Here's few examples with the same error and fixed:

More information:

Bye!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.