Skip to content

Commit c78babc

Browse files
author
Kevin Wood-Friend
committed
Fix for bug in Format.php's to_html() which failed to detect if $data was really a multidimensional array.
Prior, array('foo', 'bar', 'baz') would be considered a multidimensional array and spit out a PHP warning.
1 parent 52219d8 commit c78babc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

application/libraries/Format.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ public function to_html()
146146
{
147147
$data = $this->_data;
148148

149-
// Multi-dimentional array
150-
if (isset($data[0]))
149+
// Multi-dimensional array
150+
if (isset($data[0]) && is_array($data[0]))
151151
{
152152
$headings = array_keys($data[0]);
153153
}

0 commit comments

Comments
 (0)