for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @copyright Copyright (c) 2011 - 2014 Aleksandr Torosh (http://wezoom.net)
* @author Aleksandr Torosh <[email protected]>
*/
namespace Cms\Form;
use Application\Form\Form;
use Phalcon\Forms\Element\Check;
use Phalcon\Forms\Element\Select;
use Phalcon\Forms\Element\Text;
class ConfigurationForm extends Form
{
public function initialize()
$this->add((new Check('DEBUG_MODE'))->setLabel('Debug mode, display application errors'));
(new \Phalcon\Forms\Elem...ay application errors')
null
object<Phalcon\Forms\ElementInterface>
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example:
function acceptsInteger($int) { } $x = '123'; // string "123" // Instead of acceptsInteger($x); // we recommend to use acceptsInteger((integer) $x);
$this->add((new Check('PROFILER'))->setLabel('DB Profiler'));
(new \Phalcon\Forms\Elem...setLabel('DB Profiler')
$this->add((new Check('DISPLAY_CHANGELOG'))->setLabel('Display Changelog at Admin dashboard startpage'));
(new \Phalcon\Forms\Elem...n dashboard startpage')
$this->add((new Check('WIDGETS_CACHE'))->setLabel('Widgets caching'));
(new \Phalcon\Forms\Elem...abel('Widgets caching')
$this->add((new Text('ADMIN_EMAIL'))->setLabel('Admin Email'));
(new \Phalcon\Forms\Elem...setLabel('Admin Email')
$this->add((new Check('TECHNICAL_WORKS'))->setLabel('Site is under maintenance'));
(new \Phalcon\Forms\Elem... is under maintenance')
}
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: