diff --git a/lib/accesslib.php b/lib/accesslib.php index c5a13fea1a2..c95bdc5dcc0 100644 --- a/lib/accesslib.php +++ b/lib/accesslib.php @@ -4743,15 +4743,6 @@ abstract class context extends stdClass implements IteratorAggregate { */ protected $_locked; - /** - * Whether any parent of the current context is locked. - * - * Can be accessed publicly through $context->ancestorlocked. - * - * @var int - */ - protected $_ancestorlocked; - /** * @var array Context caching info */ @@ -5366,8 +5357,7 @@ abstract class context extends stdClass implements IteratorAggregate { } if ($parent = $this->get_parent_context()) { - $this->_ancestorlocked = $parent->is_locked(); - return $this->_ancestorlocked; + return $parent->is_locked(); } return false;