Access Level to certain class must be public error in PHP

前端 未结 5 1665
猫巷女王i
猫巷女王i 2021-01-17 18:21

I created this class



        
5条回答
  •  忘掉有多难
    2021-01-17 18:53

    Youre getting that error because the visibility of the method must be the same or less restrictive than that of it its definition on a parent class. In this case you have addErrors as public on your abstract class and are attempting to make it protected on a child class.

提交回复
热议问题