mirror of
https://github.com/processwire/processwire.git
synced 2025-08-24 15:23:11 +02:00
Fix issue processwire/processwire-issues#302 where markup <region>
tags didn't get removed if template file produced no output
This commit is contained in:
@@ -1315,6 +1315,7 @@ class WireMarkupRegions extends Wire {
|
||||
if(!count($regions)) {
|
||||
if($debug) $htmlDocument = str_replace($debugLandmark, "<pre>No regions</pre>$debugLandmark", $htmlDocument);
|
||||
$recursionLevel--;
|
||||
if(!$recursionLevel) $this->removeRegionTags($htmlDocument);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1480,7 +1481,7 @@ class WireMarkupRegions extends Wire {
|
||||
* @return bool True if tags or attributes were removed, false if not
|
||||
*
|
||||
*/
|
||||
protected function removeRegionTags(&$html) {
|
||||
public function removeRegionTags(&$html) {
|
||||
|
||||
$updated = false;
|
||||
|
||||
|
Reference in New Issue
Block a user