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

Sqlite plugin + shortcode weird error

Started by David Lannan 8 years ago · 2 replies · 653 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 Slebeig, 5 days ago
1 102 5 days ago
Plugins · by Rene, 4 weeks ago
2 303 4 weeks ago
Plugins · by Xavier, 2 months ago
2 223 1 month ago
Plugins · by Luka Prinčič, 7 years ago
3 1411 2 months ago
Plugins · by Sebastian van de Meer, 2 months ago
1 322 2 months ago