added check for json encoder, cleaned up error handling a bit

This commit is contained in:
Martynas Mickevicius
2010-08-06 13:22:04 +03:00
parent 47f67613a2
commit 59f220eb13
5 changed files with 52 additions and 40 deletions

View File

@@ -50,11 +50,10 @@ if (PMA_isValid($_REQUEST['chartSettings'], 'array')) {
$chartSettings = $_REQUEST['chartSettings'];
}
// get the chart and settings and errors after chart generation
$chartErrors = array();
$chart = PMA_chart_results($data, $chartSettings, $chartErrors);
// get the chart and settings after chart generation
$chart = PMA_chart_results($data, $chartSettings);
if (empty($chartErrors)) {
if (!empty($chart)) {
$message = PMA_Message::success(__('Chart generated successfully.'));
}
else {