Can't use method return value in write context

后端 未结 8 1345
野趣味
野趣味 2020-11-22 01:52

I would think the following piece of code should work, but it doesn\'t (Edited: Now works in PHP 5.5+):

if (!empty($r->getError()))
         


        
8条回答
  •  深忆病人
    2020-11-22 02:39

    The alternative way to check if an array is empty could be:

    count($array)>0
    

    It works for me without that error

提交回复
热议问题