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

bleedingdeacons / sentinel / 31238108703
91%

Build:
DEFAULT BRANCH: main
Ran 08 Aug 2026 03:51AM UTC
Jobs 1
Files 8
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

08 Aug 2026 03:50AM UTC coverage: 90.625% (-0.06%) from 90.682%
31238108703

push

github

web-flow
fix: guard preg_replace() nulls in the wp-config writers, PHPStan level 8 (#44)

Level 8 checks calls and property reads against nullable types. Sentinel
reported 7 findings, all preg_replace() returning string|null on a PCRE
failure and that null reaching a string parameter — under strict_types a
TypeError raised part-way through editing the site's wp-config.php.

Two kinds of call site, handled differently:

Rewrites that produce the content being written are guarded to abort.
setWpConfigConstant() takes both its rewrite branches through
preg_replace(), so one guard before atomicWrite() covers them;
removeWpConfigConstant()'s define()-stripping replace is guarded the same
way. Failure leaves wp-config.php untouched, matching the file_get_contents()
and is_writable() guards already above them.

The trailing "/\n{3,}/" blank-line tidy is cosmetic and runs after the
removal has already succeeded, so a failure there keeps the uncollapsed
content rather than throwing the removal away. Three sites: SettingsPage,
UnityControlPage::removeKillSwitch() and its production-constant twin —
both of which already guarded their first preg_replace() and only missed
this one.

No baseline entries added. phpstan, phpcs and 190 tests green.

11 of 13 new or added lines in 2 files covered. (84.62%)

1711 of 1888 relevant lines covered (90.63%)

4.34 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
98.06
-0.34% src/Admin/SettingsPage.php
Jobs
ID Job ID Ran Files Coverage
1 31238108703.1 08 Aug 2026 03:51AM UTC 8
90.63
GitHub Action Run
Source Files on build 31238108703
  • Tree
  • List 8
  • Changed 3
  • Source Changed 3
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #31238108703
  • 538c3607 on github
  • Prev Build on main (#31223835313)
  • Next Build on main (#31332364188)
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