1

I am encountering this error when trying to run a site using WAMP.

But it works fine on my LAMP VM.

The parent function has this signature:

public function get($table, $join = null, $column = null, $where = null)
{

And it is extended like so:

class DatabaseAccess extends Medoo
{
    public function get($table, $columns, $where = null)
    {
        return parent::get($table, $columns, $where);
    }

Is WAMP more strict with this or am I missing something obvious?

stefanhorne
  • 1,619
  • 3
  • 16
  • 23

1 Answers1

1

You are overriding the method with a different signature. This would broke inheritance if was allowed. Why would you extend a database adapter at all? Just use it as is or wrap in a new class instead of inheritance if you want a simpler interface.

Edit: BTW You can probably fix this by disabling strict standards.

error_reporting(E_ALL & ~E_STRICT)
Cemal Eker
  • 1,266
  • 1
  • 9
  • 24
  • Thanks for the feedback, Unfortunately I don't have that option. This is a fairly big system which I have recently taken over and I would rather get the extended class working than replace every use of it in the whole system. Why does this work on the VM though? – stefanhorne Oct 18 '16 at 23:57
  • `error_reporting` probably disabled on VM. At 5.4.0 E_STRICT became part of E_ALL. – Cemal Eker Oct 19 '16 at 00:00
  • That seems to have solved it. I'll use that as a temporary workaround. Really appreciate the help – stefanhorne Oct 19 '16 at 00:01