Repository navigation
Bugfix Issue 1513 RequirementCopyVersion FreezeLink EWarning
Bugfix — Issue #1513: reqedit create-new-version — 2x E_WARNING Undefined property stdClass::$freezeLinkOnNewReqVersion in requirement_mgr::copy_version
Every requirement_mgr::copy_version() invocation (any create_new_version()
path — legacy req edit controllers, the modern api/reqimport BFF
actionOnHit=create_new_version, bulk createFromXML/createFromMap) logs a PHP 8
E_WARNING "Undefined property: stdClass::$freezeLinkOnNewReqVersion" into the
events table (Event Viewer, log_level=2):
E_WARNING
Undefined property: stdClass::$freezeLinkOnNewReqVersion - in .../lib/functions/requirement_mgr.class.php - Line 2477
A second masked warning (requirement_mgr::$debugMsg, line 2498) fires as
soon as the freeze option is honoured.
Reproduced 2026-09-15 on PHP 8 / MariaDB (fresh fixture: project 1000/PROJ
option_reqs=1, req_spec 1001, requirement 1002/REQ-001 + versions) via a CLI
harness booting the app like a BFF and calling
requirement_mgr::create_new_version(1002) — events row as above. The modern
reqEdit.html Create New Version button goes through
api/reqedit/index.php → create_version() (bare INSERT, not copy_version()),
so the bug surface is the copy_version() path itself.
-
config.inc.php:1415defines the option asfreezeLinkOnNewREQVersion(REQuppercase). -
copy_version()(requirementsrequirement_mgr.class.php:2477-2478) readfreezeLinkOnNewReqVersion— wrong casing — off thestdClass(line 66). PHP 8 undefined-property access →E_WARNING. -
lib/functions/logger.class.php:1483+watchPHPErrors→logWarningEventwrites theE_WARNINGrow intoevents(log_level=2). - The null value also defeated line 2487
if($freezeLinkOnNewReqVersion)→updateTCVLinkStatus(...)(link-freeze on new REQ version) silently never ran. - Fixing the mask exposed the long-dormant
closeOpenTCVersionOnOpenLinks()$this->debugMsgtypo (line 2498, unchanged since legacycb365cd5e, 1.9.18) — the$freezeLinkedTCasesnull-guard had kept that branch unreachable.
lib/functions/requirement_mgr.class.php (minimal, no signature change):
-
copy_version()— read the real key:$freezeLinkOnNewREQVersion = $reqTCLinksCfg->freezeLinkOnNewREQVersion;(2477/2478/2487). -
closeOpenTCVersionOnOpenLinks()— local$debugMsg = 'Class:...'(line 2498), keeping the/* ... */SQL-comment wrapper in the UPDATE (dropping it produces SQL 1064, caught during verification).
Both warnings are on the same new-version user action, so both must be gone to meet the issue's Expected state ("No Error/Warning event entries").
- CLI
create_new_version()runs →eventsgains 0 rows. - With an OPEN
req_coveragelink on the source version → link flipslink_status 1 → 4 (LINK_TC_REQ_CLOSED_BY_NEW_REQVERSION),is_active → 0(option finally honoured). - Browser
reqEdit.html→ Create New Version → version OK, events 0, console clean. -
php -lclean; grepfreezeLinkOnNewReqVersion→ 0 hits.

-
lib/functions/requirement_mgr.class.php(5 lines) -
tmp/TLU_Test_Cases.md(regression suite #1513) -
docs/Bugfix-Issue-1513-RequirementCopyVersion-FreezeLink-EWarning.md+ screenshot -
CHANGELOG(key bugfix line)