Details
-
Bug
-
Resolution: Won't Fix
-
None
-
None
-
High
Description
problem
if $nearest is null is not handled properly:
ERROR Error: E9999 - Call to a member function addChild() on null\n in core /var/www/translate5/application/modules/editor/Segment/FieldTags.php
context
foreach($clones as $tag){ // this "mechanic" is just to correct problems with singular tags on the right boundry of non-singular tags: The will be sorted right after the non-singular but may are nested into. We have to correct this ... $nearest = $this->findHolderByOrder($processed, $tag); if($nearest == NULL){ $nearest = $container->getNearestContainer($tag); // this is the "normal" way of nesting the sorted cloned tags } // Will log rendering problems if(self::VALIDATION_MODE && $nearest == null){ error_log("\n============== HOLDER =============\n"); error_log($holder->toJson()); error_log("\n============== CONTAINER =============\n"); error_log($container->toJson()); error_log("\n============== TAG =============\n"); error_log($tag->toJson()); error_log("\n========================================\n"); } //HERE COMES THE PROBLEM on $nearest == null: $nearest->addChild($tag); $container = $tag; $processed[] = $tag; }
additional todo
convert the error_log output to a error_log info message!