Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Plugins

Sqlite plugin + shortcode weird error

Started by David Lannan 8 years ago · 2 replies · 594 views
8 years ago

I have been trying for the last day to get the SQLite plugin (with shortcode dependency installed) and it keeps returning this error:

Whoops \ Exception \ ErrorException (E_WARNING)

Missing argument 2 for Grav\Plugin\Shortcodes\SqlTableShortcode::log(), called in C:\dev\repos\grav\server\www\scenarist\user\plugins\sqlite\shortcodes\SqlTableShortcode.php on line 16 and defined


Im very puzzled, and there are no obvious issues on the GitHub site relating to it.
Anyone who has any thoughts, it would be greatly appreciated.
Cheers,
David

8 years ago

I have managed to find the issue. Looks like there is a bug in the SQLite php.
File: SqlTableShortcode.php line 16
$this->log($this->grav['sqlite']['error']);

This log call should have two params. I changed it to this:
$this->log($this->grav['sqlite']['error'], $this->grav['sqlite']['error']);

This seems to work - not sure if its technically correct.
At least the shortcode and the SQLite plugin is now working properly.

8 years ago

Thank you for finding the issue.

The log function does indeed need two parameters, but the first should be self::ERROR

I have changed the code and added you to the credits in the README

A new version has just been released.

Suggested topics

Topic Participants Replies Views Activity
Plugins · by Rene, 1 week ago
2 43 1 week ago
Plugins · by Xavier, 4 weeks ago
2 53 4 weeks ago
Plugins · by Luka Prinčič, 7 years ago
3 1179 1 month ago
Plugins · by Sebastian van de Meer, 1 month ago
1 48 1 month ago
Plugins · by PIERROT Alain, 2 months ago
3 72 2 months ago