Jump to content

Bug on \IPS\Helpers\Table\Table


Recommended Posts

Tryingo to extend \IPS\Notification\Table, which extends \IPS\Helpers\Table\Table:

	/**
	 * Constructor
	 *
	 * @param	\IPS\Http\Url	Base URL
	 * @return	void
	 */
	public function __construct( \IPS\Http\Url $url=NULL )
	{
		/* Init */	
		parent::__construct( $url );
	}

This simple hook returns an error if the user has no notiications:

Quote

Whoops\Exception\ErrorException: count(): Parameter must be an array or an object that implements Countable (2)
#0 C:\wamp64\www\test\system\Helpers\Table\Table.php(521): Whoops\Run->handleError(2, 'count(): Parame...', 'C:\\wamp64\\www\\t...', 521, Array)
#1 C:\wamp64\www\test\applications\core\modules\front\system\notifications.php(63): IPS\Helpers\Table\_Table->__toString()
#2 C:\wamp64\www\test\system\Dispatcher\Controller.php(96): IPS\core\modules\front\system\_notifications->manage()
#3 C:\wamp64\www\test\system\Dispatcher\Dispatcher.php(152): IPS\Dispatcher\_Controller->execute()
#4 C:\wamp64\www\test\index.php(13): IPS\_Dispatcher->run()
#5 {main}

Works fine if I have notifications.

Link to comment
Share on other sites

1 hour ago, newbie LAC said:

Exclude E_WARNING from error_reporting

Time by time during development I get warnings and should disable them.

this is a problem on the IPS side, it should be reported, you shouldn't suppress anything from error_reporting. this issue can be reproduced without a hook. they are return NULL for getRows if it is empty. 

Link to comment
Share on other sites

5 minutes ago, CodingJungle said:

this is a problem on the IPS side, it should be reported, you shouldn't suppress anything from error_reporting. this issue can be reproduced without a hook. they are return NULL for getRows if it is empty. 

I haven't time report every warning. IPS should enable ALL levels when they development.

Link to comment
Share on other sites

Archived

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

  • Recently Browsing   0 members

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