docxgen icon indicating copy to clipboard operation
docxgen copied to clipboard

Problems in nested Blocks

Open MarcoSillano opened this issue 12 years ago • 1 comments

Good tool, i am planning use it! But I have a problem: if i modify "example.php" found in djpate-phpdocx-5006fb8 like this: .... omissis... $phpdocx->assignNestedBlock("pets",array(array("#PETNAME#"=>"Rox"),array("#PETNAME#"=>"Bob")),array("members"=>2)); // would create a block pets for jane doe with 2 pets: rox and bob ... omissis.... This don't work as expected, car it produces: ---------------- omissis Rox Favorite toys

  • Frisbee Bob Favorite toys
  • Frisbee ---------------------------- And, if i change : $phpdocx->assignNestedBlock("toys",array(array("#TOYNAME#"=>"Frisbee")),array("members"=>2,"pets"=>1)); // would create a block toy for rox to: $phpdocx->assignNestedBlock("toys",array(array("#TOYNAME#"=>"Frisbee")),array("members"=>2,"pets"=>2)); // would create a block toy for bob I get an error: Notice: Undefined offset: 0 in phpDocx.php on line 291.

A bug or I mistake? Greetings.

MarcoSillano avatar Nov 06 '11 15:11 MarcoSillano

Same issue here, I think it's a bug. I know it's an old question but, has anyone found a fix/workaround ?

P4Thi0ut avatar Mar 31 '16 10:03 P4Thi0ut