catfan / Medoo

The lightweight PHP database framework to accelerate the development.
https://medoo.in
MIT License
4.83k stars 1.15k forks source link

syntax #688

Closed mingyuantech closed 6 years ago

mingyuantech commented 6 years ago
// method: dataImplode -> 531 line
$stack[] = !empty(array_diff_key($value, array_keys(array_keys($value)))) ?
    '(' . $this->dataImplode($value, $map, ' ' . $relationship) . ')' :
    '(' . $this->innerConjunct($value, $map, ' ' . $relationship, $conjunctor) . ')';
PHP Fatal error:  Can't use function return value in write context in /development/resource/medoo.php on line 531

This syntax, at least PHP 5.5+.

// Suggest: !empty change count
$stack[] = count(array_diff_key($value, array_keys(array_keys($value)))) ?
     '(' . $this->dataImplode($value, $map, ' ' . $relationship) . ')' :
     '(' . $this->innerConjunct($value, $map, ' ' . $relationship, $conjunctor) . ')';
catfan commented 6 years ago

We fixed for it a40ab7f8729.