Skip to content

Commit 835aa9c

Browse files
authored
Merge branch 'develop' into fix_php7_issues
2 parents b926eec + f4697ab commit 835aa9c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/PhpWord/Writer/Word2007/Style/Frame.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
*/
2929
class Frame extends AbstractStyle
3030
{
31+
const PHP_32BIT_INT_MAX = 2147483647;
32+
3133
/**
3234
* Write style.
3335
*/
@@ -39,7 +41,8 @@ public function write()
3941
}
4042
$xmlWriter = $this->getXmlWriter();
4143

42-
$zIndices = array(FrameStyle::WRAP_INFRONT => PHP_INT_MAX, FrameStyle::WRAP_BEHIND => -PHP_INT_MAX);
44+
$maxZIndex = min(PHP_INT_MAX, self::PHP_32BIT_INT_MAX);
45+
$zIndices = array(FrameStyle::WRAP_INFRONT => $maxZIndex, FrameStyle::WRAP_BEHIND => -$maxZIndex);
4346

4447
$properties = array(
4548
'width' => 'width',

0 commit comments

Comments
 (0)