Commit aa0bbec7 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Evaluate.php: if AutoCron.php is called via commandline, Evaluate.php had...

Evaluate.php: if AutoCron.php is called via commandline, Evaluate.php had problems to interpret tenary operators. Fixed.
parent 8fb46a0d
Pipeline #666 passed with stage
in 1 minute and 29 seconds
......@@ -189,7 +189,12 @@ class Evaluate {
$result = Support::decryptDoubleCurlyBraces($result);
if ($flagTokenReplaced === true) {
$debugLocal[] = $debugIndent . "FINAL: " . is_array($result) ? "array(" . count($result) . ")" : "$result";
if (is_array($result)) {
$str = "array(" . count($result) . ")";
} else {
$str = "$result";
}
$debugLocal[] = $debugIndent . "FINAL: " . $str;
$debugStack = $debugLocal;
}
......@@ -206,7 +211,7 @@ class Evaluate {
* @throws UserFormException
* @throws UserReportException
*/
private function inlineLink($arrToken, $dbIndex, &$foundInStore){
private function inlineLink($arrToken, $dbIndex, &$foundInStore) {
$token = OnString::trimQuote(trim(implode(' ', $arrToken)));
......@@ -228,10 +233,10 @@ class Evaluate {
* @throws UserFormException
* @throws UserReportException
*/
private function inlineDataDndApi($arrToken, $dbIndex, &$foundInStore){
private function inlineDataDndApi($arrToken, $dbIndex, &$foundInStore) {
$token = OnString::trimQuote(trim(implode(' ', $arrToken)));
if(empty($token)){
if (empty($token)) {
throw new UserReportException('Missing form name for "data-dnd-api"', ERROR_MISSING_FORM);
}
......@@ -316,12 +321,12 @@ class Evaluate {
array_pop($arrToken); // remove 'link' | 'data-dnd-api'
array_pop($arrToken); // remove 'as'
if (strcasecmp($type, COLUMN_LINK ) == 0) {
return($this->inlineLink($arrToken, $dbIndex,$foundInStore));
if (strcasecmp($type, COLUMN_LINK) == 0) {
return ($this->inlineLink($arrToken, $dbIndex, $foundInStore));
}
if($type == DND_DATA_DND_API){
return($this->inlineDataDndApi($arrToken, $dbIndex,$foundInStore));
if ($type == DND_DATA_DND_API) {
return ($this->inlineDataDndApi($arrToken, $dbIndex, $foundInStore));
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment