Quantcast

What is the meaning of this error in cakephp 3?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

What is the meaning of this error in cakephp 3?

Clement Crownrise
Hello, I am doing the blog tutorial in cakephp 3, but I got this notice at the top of my page, please does anyone know the meaning and how to solve it?

Strict (2048): Declaration of App\Controller\AppController::beforefilter() should be compatible with Cake\Controller\Controller::beforeFilter(Cake\Event\Event $event) [APP/Controller\AppController.php, line 29]



Strict (2048): Declaration of App\Controller\UsersController::beforefilter() should be compatible with App\Controller\AppController::beforefilter() [APP/Controller\UsersController.php, line 10]

Your help will be appreciated

--
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup
 
We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon.
 
Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: What is the meaning of this error in cakephp 3?

Willem
Just as it says. You need to have the same method signature as the one you are overriding. Thus:

public function beforeFilter(Event $event)
{
return null;
}

you forgot the parameter.


Willem



On 12 Mar 2016, at 10:30, Clement Crownrise <[hidden email]> wrote:

Hello, I am doing the blog tutorial in cakephp 3, but I got this notice at the top of my page, please does anyone know the meaning and how to solve it?

Strict (2048): Declaration of App\Controller\AppController::beforefilter() should be compatible with Cake\Controller\Controller::beforeFilter(Cake\Event\Event $event) [APP/Controller\AppController.php, line 29]



Strict (2048): Declaration of App\Controller\UsersController::beforefilter() should be compatible with App\Controller\AppController::beforefilter() [APP/Controller\UsersController.php, line 10]

Your help will be appreciated

--
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup
 
We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon.
 
Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup
 
We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon.
 
Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: What is the meaning of this error in cakephp 3?

Clement Crownrise
Hi, Thanks Willem,

I have tried it, but the error still persists , look at the code below


    public function beforefilter(Event $event){
        //parent::beforefilter($event);
        //$this->Auth->allow(['add','logout']);
        return null;
    }

On Sat, Mar 12, 2016 at 11:52 AM, Willem Schwarte <[hidden email]> wrote:
Just as it says. You need to have the same method signature as the one you are overriding. Thus:

public function beforeFilter(Event $event)
{
return null;
}

you forgot the parameter.


Willem



On 12 Mar 2016, at 10:30, Clement Crownrise <[hidden email]> wrote:

Hello, I am doing the blog tutorial in cakephp 3, but I got this notice at the top of my page, please does anyone know the meaning and how to solve it?

Strict (2048): Declaration of App\Controller\AppController::beforefilter() should be compatible with Cake\Controller\Controller::beforeFilter(Cake\Event\Event $event) [APP/Controller\AppController.php, line 29]



Strict (2048): Declaration of App\Controller\UsersController::beforefilter() should be compatible with App\Controller\AppController::beforefilter() [APP/Controller\UsersController.php, line 10]

Your help will be appreciated

--
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup
 
We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon.
 
Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup
 
We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon.
 
Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to a topic in the Google Groups "CakePHP" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cake-php/qEur8oKsm48/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.



--

--
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup
 
We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon.
 
Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: What is the meaning of this error in cakephp 3?

Matías Croce
Maybe you forgot the namespace. You should use:

use  Cake\Event\Event;

or

beforeFilter(Cake\Event\Event $event)



On 12/03/16 15:46, Clement Crownrise wrote:

> Hi, Thanks Willem,
>
> I have tried it, but the error still persists , look at the code below
>
>
>     public function beforefilter(Event $event){
>         //parent::beforefilter($event);
>         //$this->Auth->allow(['add','logout']);
>         return null;
>     }
>
> On Sat, Mar 12, 2016 at 11:52 AM, Willem Schwarte <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Just as it says. You need to have the same method signature as the
>     one you are overriding. Thus:
>
>     public function beforeFilter(Event $event) { return null; }
>
>
>     you forgot the parameter.
>
>
>     Willem
>
>
>
>>     On 12 Mar 2016, at 10:30, Clement Crownrise
>>     <[hidden email] <mailto:[hidden email]>>
>>     wrote:
>>
>>     Hello, I am doing the blog tutorial in cakephp 3, but I got this
>>     notice at the top of my page, please does anyone know the meaning
>>     and how to solve it?
>>
>>     *Strict* (2048): Declaration of App\Controller\AppController::beforefilter() should be compatible with Cake\Controller\Controller::beforeFilter(Cake\Event\Event $event) [*APP/Controller\AppController.php*, line*29*]
>>
>>
>>
>>     *Strict* (2048): Declaration of App\Controller\UsersController::beforefilter() should be compatible with App\Controller\AppController::beforefilter() [*APP/Controller\UsersController.php*, line*10*]
>>
>>     Your help will be appreciated
>>
>>     --
>>     Sign up for our Newsletter for updates.
>>     http://cakephp.org/newsletter/signup
>>
>>     We will soon be closing this Google Group. But don't worry, we
>>     have something better coming. Stay tuned for an updated from the
>>     CakePHP Team soon.
>>
>>     Like Us on FaceBook https://www.facebook.com/CakePHP
>>     Follow us on Twitter http://twitter.com/CakePHP
>>     ---
>>     You received this message because you are subscribed to the
>>     Google Groups "CakePHP" group.
>>     To unsubscribe from this group and stop receiving emails from it,
>>     send an email to [hidden email]
>>     <mailto:[hidden email]>.
>>     For more options, visit https://groups.google.com/d/optout.
>
>     --
>     Sign up for our Newsletter for updates.
>     http://cakephp.org/newsletter/signup
>
>     We will soon be closing this Google Group. But don't worry, we
>     have something better coming. Stay tuned for an updated from the
>     CakePHP Team soon.
>
>     Like Us on FaceBook https://www.facebook.com/CakePHP
>     Follow us on Twitter http://twitter.com/CakePHP
>     ---
>     You received this message because you are subscribed to a topic in
>     the Google Groups "CakePHP" group.
>     To unsubscribe from this topic, visit
>     https://groups.google.com/d/topic/cake-php/qEur8oKsm48/unsubscribe.
>     To unsubscribe from this group and all its topics, send an email
>     to [hidden email]
>     <mailto:[hidden email]>.
>     For more options, visit https://groups.google.com/d/optout.
>
>
>
>
> --
> http://www.clementcrownrise.name/images/nameing.gif
> --
> Sign up for our Newsletter for updates.
> http://cakephp.org/newsletter/signup
>
> We will soon be closing this Google Group. But don't worry, we have
> something better coming. Stay tuned for an updated from the CakePHP
> Team soon.
>
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Follow us on Twitter http://twitter.com/CakePHP
> ---
> You received this message because you are subscribed to the Google
> Groups "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [hidden email]
> <mailto:[hidden email]>.
> For more options, visit https://groups.google.com/d/optout.

--
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: What is the meaning of this error in cakephp 3?

heavyKevy
In reply to this post by Clement Crownrise
You also need to make sure that you add the following line near the top of the file after the namespace with the other use statements:

use Cake\Event\Event;

Best regards,
--Kevin


On Sunday, March 13, 2016 at 1:47:10 AM UTC+7, Clement Crownrise wrote:
Hi, Thanks Willem,

I have tried it, but the error still persists , look at the code below


    public function beforefilter(Event $event){
        //parent::beforefilter($event);
        //$this->Auth->allow(['add','logout']);
        return null;
    }

On Sat, Mar 12, 2016 at 11:52 AM, Willem Schwarte <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="p4rXV5HPBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">wsch...@...> wrote:
Just as it says. You need to have the same method signature as the one you are overriding. Thus:

public function beforeFilter(Event $event)
{
return null;
}

you forgot the parameter.


Willem



On 12 Mar 2016, at 10:30, Clement Crownrise <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="p4rXV5HPBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">clementc...@...> wrote:

Hello, I am doing the blog tutorial in cakephp 3, but I got this notice at the top of my page, please does anyone know the meaning and how to solve it?

Strict (2048): Declaration of App\Controller\AppController::beforefilter() should be compatible with Cake\Controller\Controller::beforeFilter(Cake\Event\Event $event) [APP/Controller\AppController.php, line 29]



Strict (2048): Declaration of App\Controller\UsersController::beforefilter() should be compatible with App\Controller\AppController::beforefilter() [APP/Controller\UsersController.php, line 10]

Your help will be appreciated

--
Sign up for our Newsletter for updates.
<a href="http://cakephp.org/newsletter/signup" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Fcakephp.org%2Fnewsletter%2Fsignup\46sa\75D\46sntz\0751\46usg\75AFQjCNGErMluKHvMycgXNStE2DC-BG17zg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Fcakephp.org%2Fnewsletter%2Fsignup\46sa\75D\46sntz\0751\46usg\75AFQjCNGErMluKHvMycgXNStE2DC-BG17zg&#39;;return true;">http://cakephp.org/newsletter/signup
 
We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon.
 
Like Us on FaceBook <a href="https://www.facebook.com/CakePHP" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\75https%3A%2F%2Fwww.facebook.com%2FCakePHP\46sa\75D\46sntz\0751\46usg\75AFQjCNG_OVGPrsW2S4xCvT0yb2leRWBsQg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\75https%3A%2F%2Fwww.facebook.com%2FCakePHP\46sa\75D\46sntz\0751\46usg\75AFQjCNG_OVGPrsW2S4xCvT0yb2leRWBsQg&#39;;return true;">https://www.facebook.com/CakePHP
Follow us on Twitter <a href="http://twitter.com/CakePHP" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Ftwitter.com%2FCakePHP\46sa\75D\46sntz\0751\46usg\75AFQjCNGm99t3RztzLJAbpv22cUAOb0aFHw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Ftwitter.com%2FCakePHP\46sa\75D\46sntz\0751\46usg\75AFQjCNGm99t3RztzLJAbpv22cUAOb0aFHw&#39;;return true;">http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="p4rXV5HPBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">cake-php+u...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
Sign up for our Newsletter for updates.
<a href="http://cakephp.org/newsletter/signup" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Fcakephp.org%2Fnewsletter%2Fsignup\46sa\75D\46sntz\0751\46usg\75AFQjCNGErMluKHvMycgXNStE2DC-BG17zg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Fcakephp.org%2Fnewsletter%2Fsignup\46sa\75D\46sntz\0751\46usg\75AFQjCNGErMluKHvMycgXNStE2DC-BG17zg&#39;;return true;">http://cakephp.org/newsletter/signup
 
We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon.
 
Like Us on FaceBook <a href="https://www.facebook.com/CakePHP" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\75https%3A%2F%2Fwww.facebook.com%2FCakePHP\46sa\75D\46sntz\0751\46usg\75AFQjCNG_OVGPrsW2S4xCvT0yb2leRWBsQg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\75https%3A%2F%2Fwww.facebook.com%2FCakePHP\46sa\75D\46sntz\0751\46usg\75AFQjCNG_OVGPrsW2S4xCvT0yb2leRWBsQg&#39;;return true;">https://www.facebook.com/CakePHP
Follow us on Twitter <a href="http://twitter.com/CakePHP" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Ftwitter.com%2FCakePHP\46sa\75D\46sntz\0751\46usg\75AFQjCNGm99t3RztzLJAbpv22cUAOb0aFHw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Ftwitter.com%2FCakePHP\46sa\75D\46sntz\0751\46usg\75AFQjCNGm99t3RztzLJAbpv22cUAOb0aFHw&#39;;return true;">http://twitter.com/CakePHP
---
You received this message because you are subscribed to a topic in the Google Groups "CakePHP" group.
To unsubscribe from this topic, visit <a href="https://groups.google.com/d/topic/cake-php/qEur8oKsm48/unsubscribe" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/topic/cake-php/qEur8oKsm48/unsubscribe&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/topic/cake-php/qEur8oKsm48/unsubscribe&#39;;return true;">https://groups.google.com/d/topic/cake-php/qEur8oKsm48/unsubscribe.
To unsubscribe from this group and all its topics, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="p4rXV5HPBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">cake-php+u...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.



--
<a href="http://www.clementcrownrise.name/images/nameing.gif" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Fwww.clementcrownrise.name%2Fimages%2Fnameing.gif\46sa\75D\46sntz\0751\46usg\75AFQjCNFqKa858UapW0bxNgaJ5XSBoueSmw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Fwww.clementcrownrise.name%2Fimages%2Fnameing.gif\46sa\75D\46sntz\0751\46usg\75AFQjCNFqKa858UapW0bxNgaJ5XSBoueSmw&#39;;return true;">http://www.clementcrownrise.name/images/nameing.gif

--
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup
 
We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon.
 
Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: What is the meaning of this error in cakephp 3?

Willem
Yes. That should solve it. 

- willem

Op 13 mrt. 2016 om 08:42 heeft heavyKevy <[hidden email]> het volgende geschreven:

You also need to make sure that you add the following line near the top of the file after the namespace with the other use statements:

use Cake\Event\Event;

Best regards,
--Kevin


On Sunday, March 13, 2016 at 1:47:10 AM UTC+7, Clement Crownrise wrote:
Hi, Thanks Willem,

I have tried it, but the error still persists , look at the code below


    public function beforefilter(Event $event){
        //parent::beforefilter($event);
        //$this->Auth->allow(['add','logout']);
        return null;
    }

On Sat, Mar 12, 2016 at 11:52 AM, Willem Schwarte <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="p4rXV5HPBAAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">wsch...@...> wrote:
Just as it says. You need to have the same method signature as the one you are overriding. Thus:

public function beforeFilter(Event $event)
{
return null;
}

you forgot the parameter.


Willem



On 12 Mar 2016, at 10:30, Clement Crownrise <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="p4rXV5HPBAAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">clementc...@...> wrote:

Hello, I am doing the blog tutorial in cakephp 3, but I got this notice at the top of my page, please does anyone know the meaning and how to solve it?

Strict (2048): Declaration of App\Controller\AppController::beforefilter() should be compatible with Cake\Controller\Controller::beforeFilter(Cake\Event\Event $event) [APP/Controller\AppController.php, line 29]



Strict (2048): Declaration of App\Controller\UsersController::beforefilter() should be compatible with App\Controller\AppController::beforefilter() [APP/Controller\UsersController.php, line 10]

Your help will be appreciated

--
Sign up for our Newsletter for updates.
<a href="http://cakephp.org/newsletter/signup" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fcakephp.org%2Fnewsletter%2Fsignup\46sa\75D\46sntz\0751\46usg\75AFQjCNGErMluKHvMycgXNStE2DC-BG17zg';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fcakephp.org%2Fnewsletter%2Fsignup\46sa\75D\46sntz\0751\46usg\75AFQjCNGErMluKHvMycgXNStE2DC-BG17zg';return true;">http://cakephp.org/newsletter/signup
 
We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon.
 
Like Us on FaceBook <a href="https://www.facebook.com/CakePHP" target="_blank" rel="nofollow" onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Fwww.facebook.com%2FCakePHP\46sa\75D\46sntz\0751\46usg\75AFQjCNG_OVGPrsW2S4xCvT0yb2leRWBsQg';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Fwww.facebook.com%2FCakePHP\46sa\75D\46sntz\0751\46usg\75AFQjCNG_OVGPrsW2S4xCvT0yb2leRWBsQg';return true;">https://www.facebook.com/CakePHP
Follow us on Twitter <a href="http://twitter.com/CakePHP" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Ftwitter.com%2FCakePHP\46sa\75D\46sntz\0751\46usg\75AFQjCNGm99t3RztzLJAbpv22cUAOb0aFHw';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Ftwitter.com%2FCakePHP\46sa\75D\46sntz\0751\46usg\75AFQjCNGm99t3RztzLJAbpv22cUAOb0aFHw';return true;">http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="p4rXV5HPBAAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">cake-php+u...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">https://groups.google.com/d/optout.

--
Sign up for our Newsletter for updates.
<a href="http://cakephp.org/newsletter/signup" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fcakephp.org%2Fnewsletter%2Fsignup\46sa\75D\46sntz\0751\46usg\75AFQjCNGErMluKHvMycgXNStE2DC-BG17zg';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fcakephp.org%2Fnewsletter%2Fsignup\46sa\75D\46sntz\0751\46usg\75AFQjCNGErMluKHvMycgXNStE2DC-BG17zg';return true;">http://cakephp.org/newsletter/signup
 
We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon.
 
Like Us on FaceBook <a href="https://www.facebook.com/CakePHP" target="_blank" rel="nofollow" onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Fwww.facebook.com%2FCakePHP\46sa\75D\46sntz\0751\46usg\75AFQjCNG_OVGPrsW2S4xCvT0yb2leRWBsQg';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Fwww.facebook.com%2FCakePHP\46sa\75D\46sntz\0751\46usg\75AFQjCNG_OVGPrsW2S4xCvT0yb2leRWBsQg';return true;">https://www.facebook.com/CakePHP
Follow us on Twitter <a href="http://twitter.com/CakePHP" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Ftwitter.com%2FCakePHP\46sa\75D\46sntz\0751\46usg\75AFQjCNGm99t3RztzLJAbpv22cUAOb0aFHw';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Ftwitter.com%2FCakePHP\46sa\75D\46sntz\0751\46usg\75AFQjCNGm99t3RztzLJAbpv22cUAOb0aFHw';return true;">http://twitter.com/CakePHP
---
You received this message because you are subscribed to a topic in the Google Groups "CakePHP" group.
To unsubscribe from this topic, visit <a href="https://groups.google.com/d/topic/cake-php/qEur8oKsm48/unsubscribe" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/d/topic/cake-php/qEur8oKsm48/unsubscribe';return true;" onclick="this.href='https://groups.google.com/d/topic/cake-php/qEur8oKsm48/unsubscribe';return true;">https://groups.google.com/d/topic/cake-php/qEur8oKsm48/unsubscribe.
To unsubscribe from this group and all its topics, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="p4rXV5HPBAAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">cake-php+u...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">https://groups.google.com/d/optout.



--
<a href="http://www.clementcrownrise.name/images/nameing.gif" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.clementcrownrise.name%2Fimages%2Fnameing.gif\46sa\75D\46sntz\0751\46usg\75AFQjCNFqKa858UapW0bxNgaJ5XSBoueSmw';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.clementcrownrise.name%2Fimages%2Fnameing.gif\46sa\75D\46sntz\0751\46usg\75AFQjCNFqKa858UapW0bxNgaJ5XSBoueSmw';return true;">http://www.clementcrownrise.name/images/nameing.gif

--
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup
 
We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon.
 
Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup
 
We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon.
 
Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: What is the meaning of this error in cakephp 3?

Clement Crownrise
Thanks all, these lines of codes are already added to the UsersController.php

but the error still persists



namespace App\Controller;

use Cake\Event\Event;
use App\Controller\AppController;
use Cake\Network\Exception\NotFoundException;


class UsersController extends AppController{
   
    public function beforefilter(Event $event){
        //parent::beforefilter($event);
        //$this->Auth->allow(['add','logout']);
        return null;
    }
   

On Sun, Mar 13, 2016 at 9:14 AM, Willem Schwarte <[hidden email]> wrote:
Yes. That should solve it. 

- willem

Op 13 mrt. 2016 om 08:42 heeft heavyKevy <[hidden email]> het volgende geschreven:

You also need to make sure that you add the following line near the top of the file after the namespace with the other use statements:

use Cake\Event\Event;

Best regards,
--Kevin


On Sunday, March 13, 2016 at 1:47:10 AM UTC+7, Clement Crownrise wrote:
Hi, Thanks Willem,

I have tried it, but the error still persists , look at the code below


    public function beforefilter(Event $event){
        //parent::beforefilter($event);
        //$this->Auth->allow(['add','logout']);
        return null;
    }

On Sat, Mar 12, 2016 at 11:52 AM, Willem Schwarte <[hidden email]> wrote:
Just as it says. You need to have the same method signature as the one you are overriding. Thus:

public function beforeFilter(Event $event)
{
return null;
}

you forgot the parameter.


Willem



On 12 Mar 2016, at 10:30, Clement Crownrise <[hidden email]> wrote:

Hello, I am doing the blog tutorial in cakephp 3, but I got this notice at the top of my page, please does anyone know the meaning and how to solve it?

Strict (2048): Declaration of App\Controller\AppController::beforefilter() should be compatible with Cake\Controller\Controller::beforeFilter(Cake\Event\Event $event) [APP/Controller\AppController.php, line 29]



Strict (2048): Declaration of App\Controller\UsersController::beforefilter() should be compatible with App\Controller\AppController::beforefilter() [APP/Controller\UsersController.php, line 10]

Your help will be appreciated

--
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup
 
We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon.
 
Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup
 
We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon.
 
Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to a topic in the Google Groups "CakePHP" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cake-php/qEur8oKsm48/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.



--

--
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup
 
We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon.
 
Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup
 
We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon.
 
Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to a topic in the Google Groups "CakePHP" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cake-php/qEur8oKsm48/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.



--

--
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup
 
We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon.
 
Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: What is the meaning of this error in cakephp 3?

Clement Crownrise
In reply to this post by Clement Crownrise
Thanks All, the error has been fixed.



On Saturday, March 12, 2016 at 10:30:25 AM UTC+1, Clement Crownrise wrote:
Hello, I am doing the blog tutorial in cakephp 3, but I got this notice at the top of my page, please does anyone know the meaning and how to solve it?

Strict (2048): Declaration of App\Controller\AppController::beforefilter() should be compatible with Cake\Controller\Controller::beforeFilter(Cake\Event\Event $event) [APP/Controller\AppController.php, line 29]



Strict (2048): Declaration of App\Controller\UsersController::beforefilter() should be compatible with App\Controller\AppController::beforefilter() [APP/Controller\UsersController.php, line 10]

Your help will be appreciated

--
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup
 
We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon.
 
Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: What is the meaning of this error in cakephp 3?

Willem
So what was the problem?

Op 14 mrt. 2016 om 12:43 heeft Clement Crownrise <[hidden email]> het volgende geschreven:

Thanks All, the error has been fixed.



On Saturday, March 12, 2016 at 10:30:25 AM UTC+1, Clement Crownrise wrote:
Hello, I am doing the blog tutorial in cakephp 3, but I got this notice at the top of my page, please does anyone know the meaning and how to solve it?

Strict (2048): Declaration of App\Controller\AppController::beforefilter() should be compatible with Cake\Controller\Controller::beforeFilter(Cake\Event\Event $event) [APP/Controller\AppController.php, line 29]



Strict (2048): Declaration of App\Controller\UsersController::beforefilter() should be compatible with App\Controller\AppController::beforefilter() [APP/Controller\UsersController.php, line 10]

Your help will be appreciated

--
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup
 
We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon.
 
Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup
 
We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon.
 
Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: What is the meaning of this error in cakephp 3?

Clement Crownrise
I forgot to add

use Cake\Validation\Validator;
to the ArticlesTable file,

I also forgot to add

    public function beforefilter(Event $event){

To the AppController.php file.

Thanks all

On Mon, Mar 14, 2016 at 12:59 PM, Willem Schwarte <[hidden email]> wrote:
So what was the problem?

Op 14 mrt. 2016 om 12:43 heeft Clement Crownrise <[hidden email]> het volgende geschreven:

Thanks All, the error has been fixed.



On Saturday, March 12, 2016 at 10:30:25 AM UTC+1, Clement Crownrise wrote:
Hello, I am doing the blog tutorial in cakephp 3, but I got this notice at the top of my page, please does anyone know the meaning and how to solve it?

Strict (2048): Declaration of App\Controller\AppController::beforefilter() should be compatible with Cake\Controller\Controller::beforeFilter(Cake\Event\Event $event) [APP/Controller\AppController.php, line 29]



Strict (2048): Declaration of App\Controller\UsersController::beforefilter() should be compatible with App\Controller\AppController::beforefilter() [APP/Controller\UsersController.php, line 10]

Your help will be appreciated

--
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup
 
We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon.
 
Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup
 
We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon.
 
Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to a topic in the Google Groups "CakePHP" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cake-php/qEur8oKsm48/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.



--

--
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup
 
We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon.
 
Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Loading...