docxgen
docxgen copied to clipboard
Problems in nested Blocks
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.
Same issue here, I think it's a bug. I know it's an old question but, has anyone found a fix/workaround ?