From 716e7c8365ca4ff4b8c259245cfb7c36246a9275 Mon Sep 17 00:00:00 2001 From: vargenau Date: Thu, 15 Dec 2011 16:27:16 +0000 Subject: [PATCH] Check mandatory 'data' argument is provided. git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@8206 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/plugin/Chart.php | 4 ++++ pgsrc/Help%2FChartPlugin | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/plugin/Chart.php b/lib/plugin/Chart.php index 70420bcc3..a74d4b3af 100644 --- a/lib/plugin/Chart.php +++ b/lib/plugin/Chart.php @@ -73,7 +73,11 @@ extends WikiPlugin global $WikiTheme; $args = $this->getArgs($argstr, $request); + if (!$args['data']) { + return $this->error(_("No mandatory 'data' argument provided.")); + } extract($args); + $html = HTML(); $js = JavaScript('', array ('src' => $WikiTheme->_findData('ASCIIsvg.js'))); $html->pushContent($js); diff --git a/pgsrc/Help%2FChartPlugin b/pgsrc/Help%2FChartPlugin index 1236bf83f..bf8d7d2ea 100644 --- a/pgsrc/Help%2FChartPlugin +++ b/pgsrc/Help%2FChartPlugin @@ -1,4 +1,4 @@ -Date: Fri, 10 Sep 2010 13:46:13 +0000 +Date: Thu, 15 Dec 2011 17:25:35 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.4.0RC1) X-Rcs-Id: $Id$ Content-Type: application/x-phpwiki; @@ -44,7 +44,7 @@ then you should see the examples. |- | **data** | Graph data: a list of numbers separated by comma -| //none// +| //none (mandatory argument)// |} == Examples == -- 2.45.0