Skip to content
This repository has been archived by the owner on Dec 16, 2019. It is now read-only.

Warning: Missing argument 1 for CrudKit\Pages\BasicLoginPage::preprocess() #54

Open
stfnsch opened this issue Apr 12, 2016 · 5 comments

Comments

@stfnsch
Copy link

stfnsch commented Apr 12, 2016

When visiting the page, I get this PHP warning:

Warning: Missing argument 1 for CrudKit\Pages\BasicLoginPage::preprocess(), called in \vendor\skyronic\crudkit\src\CrudKit\CrudKitApp.php on line 51 and defined in \vendor\skyronic\crudkit\src\CrudKit\Pages\BasicLoginPage.php on line 67

In CrudKitApp.php, there is this function call of preprocess() without arguments, see line 51:

48     protected $login = null;
49     public function useLogin ($login) {
50         $this->login = $login;
51         $login->preprocess ();
52         if (!$login->check ()) {
53             $this->addPage ($login);
54             $this->render ();
55         }
56     }

File BasicLoginPage.php has got a function preprocess, but takes one argument $app, see line 67:

67  public function preprocess ($app) {
68      if ($this->url->get ('__ckLogout', false) !== false) {
69          $this->doLogout ();
70      }
71  }
@fncapps
Copy link

fncapps commented Apr 12, 2016

Same here.

It shows up when going into the login page.

@mpriereira
Copy link

I deleted $app argument in BasicLoginPage.php as it seems that it is not used at all

@stfnsch
Copy link
Author

stfnsch commented Apr 13, 2016

Yes, also using something like $login->preprocess ($this); works as a workaround.

@jaeturma
Copy link

I encounter the same error.. which one should work well?

@jamespsterling
Copy link

I removed the $app argument from the /vendor/skyronic/crudkit/src/CrudKit/Pages/BasicLoginPage.php, and the page rendered properly. Seems like a bug.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants