Welcome Guest, Not a member yet? Register   Sign In
Exception: Call to protected method CI_DB_mysqli_result::_fetch_object()
#1

(This post was last modified: 11-22-2021, 06:54 AM by virtualfreak.)

Forum Members,
I am trying to debug a web app written for phpv5.4 and CI v3.1.2 that I have moved to phpv7.3 and CI v3.1.11.
I have managed to update the app with only one error unresolved. Exception: Call to protected method CI_DB_mysqli_result::_fetch_object() from context 'Load' /.../application/controllers/pages/Load.php 977

Line 943 of Load.php
Code:
$info = $this->hour_model->graphLoad($chan_id, $dateInfo['begin'], $dateInfo['end'], $dateInfo['graphForm'], $ctype);
...
Line 977 of Load.php 
Code:
while ($result = $info->_fetch_object())

Apparently, something has changed with the newer php and CI versions that is affecting the apps ability to successfully run line 977.  

I'm a novice at CI and php and hoping that a more experienced developer may understand how the call to a protected CI_DB_mysqli_result::_fetch_object() may have changed since the older versions and can help me with  any syntax of the code or give me a suggestion on further troubleshooting it.
I provided the code elements I thought were relevant, I hope it's enough.  I appreciate any help.

Thank you.
Reply
#2

Solved by changing line 977 to while ($result = $info->next_row())
Reply




Theme © iAndrew 2016 - Forum software by © MyBB