Bug #6914

Static Object Container cannot handle optional arguments in constructors

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

Status:Resolved Start date:2010-03-23
Priority:Should have Due date:
Assigned To:Karsten Dambekalns % Done:

100%

Category:Object
Target version:TYPO3 Flow Base Distribution - 1.0 alpha 8 Estimated time:1.00 hour
PHP Version: Complexity:
Has patch: Affected Flow version:

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.

Associated revisions

Revision 67536db9
Added by Karsten Dambekalns over 5 years ago

[+BUGFIX] FLOW3 (Object): Default values of NULL for constructor arguments are now considered existing when building static object container, fixes #6914.

History

#1 Updated by Karsten Dambekalns over 5 years ago

  • Status changed from New to Accepted
  • Assigned To 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

#2 Updated by Karsten Dambekalns over 5 years ago

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

Applied in changeset r4006.

Also available in: Atom PDF