Warning: sizeof(): Parameter must be an array or an object that implements Countable on event maker

后端 未结 2 589
南旧
南旧 2021-01-28 03:01

I have an event maker on Wordpress. I\'m having this error message, maybe is because I updated to PHP 7.2:

Warning: sizeof(): Parameter must be an array or an ob         


        
相关标签:
2条回答
  • 2021-01-28 03:48

    I understand specific you want. But you can resolve the following:

    Update plugin new version. If plugin not support then you can fix code:

    if( is_array($eventos[$day]) && sizeof($eventos[$day])>0) echo "</a>"; 
    
    if(is_array($eventos[$day]) && sizeof($eventos[$day])>0) echo "<a href='#openModal$day' style='text-decoration:none;'>"
    

    Or, replace by method count()

    0 讨论(0)
  • 2021-01-28 03:58

    In PHP 7.2 sizeof Parameter must be an array or an object

    Line 413:

    if(is_array($eventos[$day]) && sizeof($eventos[$day]) > 0) echo "</a>";
    

    Line 390:

    if(is_array($eventos[$day]) && sizeof($eventos[$day])>0) echo "<a href='#openModal$day' style='text-decoration:none;'>";
    
    0 讨论(0)
提交回复
热议问题