Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed May 21, 2022
1 parent 484bf79 commit a7ca761
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 9 additions & 6 deletions src/Form/Control/Checkbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,16 @@ class Checkbox extends Form\Control
*/
public $label;

/**
* @param string|array $label
* @param string|array $class
*/
public function __construct($label = null, $class = null)
public function __construct($label = [])
{
parent::__construct($label, $class);
if (func_num_args() > 1) { // prevent bad usage
var_dump(func_get_args());
debug_print_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS);

throw new \Error('Too many method arguments');
}

parent::__construct($label);

$this->label = $this->content;
$this->content = null;
Expand Down
2 changes: 1 addition & 1 deletion src/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class View extends AbstractView implements JsExpressionable
*/
public function __construct($label = [])
{
if (func_num_args() > 1) { // prevent bad usage
if (func_num_args() > 2) { // prevent bad usage
var_dump(func_get_args());
debug_print_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS);

Expand Down

0 comments on commit a7ca761

Please sign in to comment.