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.

#1

Updated by Karsten Dambekalns over 11 years ago

  • Status changed from New to Accepted
  • Assignee set to Karsten Dambekalns
  • Target version set to 1.0 alpha 8
  • Start date set to 2010-03-23
  • Estimated time set to 1.00 h
#2

Updated by Karsten Dambekalns over 11 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Applied in changeset r4006.

Also available in: Atom PDF