Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Phalcon\Forms\Form setAction() Exception #14430

Closed
richmilns opened this issue Sep 29, 2019 · 2 comments
Closed

[BUG]: Phalcon\Forms\Form setAction() Exception #14430

richmilns opened this issue Sep 29, 2019 · 2 comments
Labels
bug A bug report status: medium Medium

Comments

@richmilns
Copy link

When trying to set the action in the class for your form using the setAction() method, an exception is thrown:

RuntimeException: Trying to call method set on a non-object

Trace:

0 /app/modules/core/lib/Forms/Login.php(16): Phalcon\Forms\Form->setAction('/users/login')
1 [internal function]: Modules\Core\Forms\Login->initialize(NULL, Array)
2 /app/modules/core/controllers/UsersController.php(48): Phalcon\Forms\Form->__construct()
3 [internal function]: Modules\Core\Controllers\UsersController->loginAction()
4 [internal function]: Phalcon\Dispatcher\AbstractDispatcher->callActionMethod(Object(Modules\Core\Controllers\UsersController), 'loginAction', Array)
5 [internal function]: Phalcon\Dispatcher\AbstractDispatcher->dispatch()
6 /app/modules/core/lib/Bootstrap/Mvc.php(541): Phalcon\Mvc\Application->handle('/')
7 /app/modules/core/lib/Bootstrap/Main.php(589): Modules\Core\Bootstrap\Mvc->runApplication()
8 /app/public/index.php(8): Modules\Core\Bootstrap\Main->run()
9 {main}

Steps to reproduce the behavior:

use Phalcon\Forms\Form;

class Login extends Form
{
    public function initialize()
    {
        $this->setAction('/users/login');
    }
}

Details

  • Phalcon version: 4.0.0-rc1
  • PHP Version: 7.3.8
  • Operating System: macOS 10.14.6
  • Installation type: Compiling from source
  • Zephir version (if any): n/a
  • Server: Apache
  • Other related info (Database, table schema): n/a
@TimurFlush
Copy link

I confirm this behavior

@niden niden mentioned this issue Sep 30, 2019
5 tasks
@niden
Copy link
Member

niden commented Sep 30, 2019

This has been resolved. Thank you @richmilns

@niden niden closed this as completed Sep 30, 2019
@niden niden added bug A bug report status: medium Medium and removed Bug - Medium labels Dec 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug report status: medium Medium
Projects
None yet
Development

No branches or pull requests

3 participants