We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$annualObject = $this->repository->findWhere([ 'id' => $id ]); 当$annualObject为空的时候。 empty($annualObject)的值,不是true / false 而是空?
var_dump(empty($annualObject))输出值为: bool(false)
isset($annualObject) 为 1, 已经被定义。 gettype($annualObject) 为 Object。
The text was updated successfully, but these errors were encountered:
空对象在 PHP 5 以上版本中计算结果不为 false: 集合对象可以判断count($order->orderDetail) > 0,或者 $order->orderDetail->isEmpty() https://laravel-china.org/docs/laravel/5.3/collections/1206#method-isempty
Sorry, something went wrong.
No branches or pull requests
var_dump(empty($annualObject))输出值为: bool(false)
isset($annualObject) 为 1, 已经被定义。
gettype($annualObject) 为 Object。
The text was updated successfully, but these errors were encountered: