File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/PhpWord/Writer/ODText/Style Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ public function write()
35
35
}
36
36
$ xmlWriter = $ this ->getXmlWriter ();
37
37
38
- $ marginTop = ($ style ->getSpaceBefore () == 0 ) ? '0 ' : round (17.6 / $ style ->getSpaceBefore (), 2 );
39
- $ marginBottom = ($ style ->getSpaceAfter () == 0 ) ? '0 ' : round (17.6 / $ style ->getSpaceAfter (), 2 );
38
+ $ marginTop = (is_null ( $ style ->getSpaceBefore ()) || $ style -> getSpaceBefore () == 0 ) ? '0 ' : round (17.6 / $ style ->getSpaceBefore (), 2 );
39
+ $ marginBottom = (is_null ( $ style -> getSpaceAfter ()) || $ style ->getSpaceAfter () == 0 ) ? '0 ' : round (17.6 / $ style ->getSpaceAfter (), 2 );
40
40
41
41
$ xmlWriter ->startElement ('style:style ' );
42
42
$ xmlWriter ->writeAttribute ('style:name ' , $ style ->getStyleName ());
You can’t perform that action at this time.
0 commit comments