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) {
|
function smarty_block_draft($params, $content, &$smarty, &$repeat) {
|
||||||
static $list = array();
|
|
||||||
|
|
||||||
$smarty->assign(array(
|
$smarty->assign(array(
|
||||||
'subject' => '',
|
'subject' => '',
|
||||||
'content' => '',
|
'content' => '',
|
||||||
@ -184,8 +182,8 @@ function smarty_block_draft($params, $content, &$smarty, &$repeat) {
|
|||||||
$id = $subject = null;
|
$id = $subject = null;
|
||||||
if ($arr) {
|
if ($arr) {
|
||||||
$firstElement = utils_array_kshift($arr);
|
$firstElement = utils_array_kshift($arr);
|
||||||
$id = array_keys($firstElement) [0];
|
$id = array_keys($firstElement);
|
||||||
$subject = $firstElement [$id];
|
$subject = $firstElement [$id [0]];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($id) {
|
if ($id) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user