Jump to content

Rest API. static non-static


newbie LAC

Recommended Posts

Posted

Hello,

In api controllers you have

	/**
	 * Class
	 */
	protected $class = 'IPS\forums\Forum';

but in some places you use 

$class = static::$class;

Examples

- applications/forums/api/forums.php method POSTitem

- applications/calendar/api/calendars.php method POSTitem

- applications/downloads/api/categories.php method POSTitem

Posted
11 hours ago, bfarber said:

but is this causing any issues that you can see?

Example for calendar

Fatal error: Access to undeclared static property: IPS\calendar\api\calendars::$class in ...\applications\calendar\api\calendars.php on line 92

 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...