Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUGFIX #820 createDrawingShape stopped working in 1.1.0 #829

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/changes/1.2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
## Bug fixes

- Word2007 Reader: Fixed cast of spacing fixing [#729](https://github.com/PHPOffice/PHPPresentation/pull/729), [#796](https://github.com/PHPOffice/PHPPresentation/pull/796) in [#818](https://github.com/PHPOffice/PHPPresentation/pull/818)
- Word2007 Writer: Fixed missing images [#829](https://github.com/PHPOffice/PHPPresentation/pull/829) by [@kw-pr](https://github.com/kw-pr)

## Miscellaneous

Expand Down
6 changes: 6 additions & 0 deletions src/PhpPresentation/Traits/ShapeCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
namespace PhpOffice\PhpPresentation\Traits;

use PhpOffice\PhpPresentation\AbstractShape;
use PhpOffice\PhpPresentation\ShapeContainerInterface;

trait ShapeCollection
{
Expand Down Expand Up @@ -76,11 +77,16 @@ public function setShapeCollection(array $shapeCollection = []): self

/**
* @return static
* @throws ShapeContainerAlreadyAssignedException&\Throwable
*/
public function addShape(AbstractShape $shape)
{
$this->shapeCollection[] = $shape;

if ($this instanceof ShapeContainerInterface && $shape->getContainer() === null) {
$shape->setContainer($this);
}

return $this;
}

Expand Down
Loading