cakebox icon indicating copy to clipboard operation
cakebox copied to clipboard

Strict (2048)

Open brunonunes opened this issue 12 years ago • 2 comments

Strict (2048): Declaration of DropboxSource::listSources() should be compatible with DataSource::listSources($data = NULL) [APP/Plugin/Dropbox/Model/Datasource/DropboxSource.php, line 333]

Strict (2048): Declaration of DropboxSource::read() should be compatible with DataSource::read(Model $model, $queryData = Array, $recursive = NULL) [APP/Plugin/Dropbox/Model/Datasource/DropboxSource.php, line 333]

brunonunes avatar Feb 24 '14 19:02 brunonunes

Patches welcome. :) I no longer actively use this library.

shama avatar Feb 24 '14 19:02 shama

Simply add some hinting to the 2 method declarations causing the error: Model/DataSource/DropboxSource.php

Line #100: Require Model Object type and set recursive to null

    public function read(Model $Model, $data = array(), $recursive = null) {
       .....
      }

Line #221: listSources set $data to NULL

    public function listSources($data = NULL) {
    .......
    }

Hope this helps, I've also identified another Issue that will need patching, and that is after API Authorization, if a User's Model is not using the default "id" for $primaryKey, instead of saving token access credentials in the correct Authenticated user's model, a new model record is created inadvertently...

e2corporation avatar Sep 26 '14 12:09 e2corporation