This error, for example, can be found in the codeigniter 3 framework when searching for the $e->message property to display error messages on the screen..
The bug is that the scope of the object we are accessing is protected (protected $message;). There are several solutions:
The most correct way is to find in the class the object that we are accessing, a method that returns this property, and use it. It may look like:
public function getMessage() {
return $this->message;
}
If this method is not found, you can add it to the object.
As a last resort, you can change an external object that is under public protection.