Fixed "syntax error, unexpected '['" bug under PHP 5.3, reported here: https://forum.flatpress.org/viewtopic.php?f=2&t=131
This commit is contained in:
parent
a1f5d625ee
commit
50c11928f6
@ -169,8 +169,6 @@ function smarty_block_draftlist($params, $content, &$smarty, &$repeat) {
|
||||
}
|
||||
|
||||
function smarty_block_draft($params, $content, &$smarty, &$repeat) {
|
||||
static $list = array();
|
||||
|
||||
$smarty->assign(array(
|
||||
'subject' => '',
|
||||
'content' => '',
|
||||
@ -184,8 +182,8 @@ function smarty_block_draft($params, $content, &$smarty, &$repeat) {
|
||||
$id = $subject = null;
|
||||
if ($arr) {
|
||||
$firstElement = utils_array_kshift($arr);
|
||||
$id = array_keys($firstElement) [0];
|
||||
$subject = $firstElement [$id];
|
||||
$id = array_keys($firstElement);
|
||||
$subject = $firstElement [$id [0]];
|
||||
}
|
||||
|
||||
if ($id) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user