Bug #6914

Static Object Container cannot handle optional arguments in constructors

Added by Karsten Dambekalns over 11 years ago. Updated almost 11 years ago.

Status:
Resolved
Priority:
Should have
Category:
Object
Start date:
2010-03-23
Due date:
% Done:

100%

Estimated time:
1.00 h
PHP Version:
Has patch:
Complexity:

Description

For a class Bar with 4 optional constructor arguments the code in the static object container looks like this:

protected function c0294($a=array()) {
  $o=new \F3\Foo\Bar($a[0],$a[1],$a[2],$a[3]);

If the arguments are not provided this leads to undefined index errors. The default values should be used instead.

Also available in: Atom PDF