for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @copyright Copyright (c) 2011 - 2014 Oleksandr Torosh (http://wezoom.net)
* @author Oleksandr Torosh <[email protected]>
*/
namespace Seo\Form;
use Application\Form\Form;
use Phalcon\Forms\Element\Text;
use Phalcon\Forms\Element\TextArea;
class ManagerForm extends Form
{
public function initialize()
$this->add((new Text('url', ['required' => 'required']))->setLabel('URL'));
(new \Phalcon\Forms\Elem...ed')))->setLabel('URL')
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 Text('head_title'))->setLabel('<title>'));
(new \Phalcon\Forms\Elem...tLabel('<title>')
$this->add((new TextArea('meta_description', ['style' => 'height: 4em; min-height: inherit']))->setLabel('<meta name="description">'));
(new \Phalcon\Forms\Elem...ame="description">')
$this->add((new TextArea('meta_keywords', ['style' => 'height: 4em; min-height: inherit']))->setLabel('<meta name="keywords">'));
(new \Phalcon\Forms\Elem...a name="keywords">')
$this->add((new TextArea('seo_text'))->setLabel('SEO Text in bottom of page'));
(new \Phalcon\Forms\Elem...ext in bottom of page')
}
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: