• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

PHPOffice / PHPPresentation / 32947681076
95%

Build:
DEFAULT BRANCH: master
Ran 26 Aug 2026 08:29AM UTC
Jobs 1
Files 141
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

26 Aug 2026 08:25AM UTC coverage: 93.176% (+0.005%) from 93.171%
32947681076

push

github

web-flow
Honour a border that was given no colour, instead of crashing on it (#932)

`Border::setColor()` accepts a `null` and stores it, but every reader of the
colour wanted a `Color`. Setting a line style as well as the null was enough to
take down both Writers and the hash:

    $shape->getBorder()->setLineStyle(Border::LINE_SINGLE)->setColor(null);

    PowerPoint2007  TypeError: writeColor(): Argument #2 ($color) must be of
                    type Color, null given
    ODPresentation  Error: Call to a member function getRGB() on null
    getHashCode()   Error: Call to a member function getHashCode() on null

It went unreported because a shape is born at `Border::LINE_NONE`, and
`writeBorder()` returns before it reaches the colour in that case.

The null keeps its place in the model rather than being replaced at the setter,
because unlike a null font, fill or shadow it is a state both formats can say.
`EG_LineFillProperties` is optional in `CT_LineProperties`, so an `a:ln` with a
width, a compound and a dash but no fill of its own is valid, and means the line
takes its colour from the theme; `svg:stroke-color` is optional in ODF, and a
`fo:border` is the CSS2 shorthand, whose colour is the optional third part.
Replacing the null with a fresh black would invent a decision the caller did not
make, and would override the theme rather than defer to it.

So the five places that read the colour are guarded instead, and no signature
moves. Four of them are the Writers -- `a:solidFill` is skipped,
`svg:stroke-color` is not written, and `fo:border` is written as a width and a
style. The fifth is `getHashCode()`, which fails on its own with no Writer
involved, and which the ODP table path reaches first: the four borders of a cell
are compared by hash before any of them is written.

The PowerPoint2007 Reader cannot tell the two apart on the way back -- a border
written without a colour reads as the black a `Border` starts with -- which the
documentation now says.

14 of 14 new or added lines in 3 files covered. (100.0%)

10514 of 11284 relevant lines covered (93.18%)

58.73 hits per line

Jobs
ID Job ID Ran Files Coverage
1 32947681076.1 26 Aug 2026 08:29AM UTC 141
93.18
GitHub Action Run
Source Files on build 32947681076
  • Tree
  • List 141
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • b07fbe8b on github
  • Prev Build on master (#32941136472)
  • Next Build on master (#32951823292)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc