I have following code it was working fine for years but since I upgraded to PHP 5.6.21 its return NULL.
$model = new Model_Status ();
$results = $model->find_all ();
foreach ( $results as $result ) {
echo $result->pk ();
}
When I echo $result on server running PHP 5.6.20 row data from mysql is loaded in $_original_values, $_primary_key_value and $_changed is empty but in PHP 5.6.21 $_primary_key_value and $_original_values are empty and _changed has values of DB columns
echo Debug::vars($result)
//php 5.6.20
protected _object => array(6) (
"id" => string(1) "1"
"name" => string(4) "Live"
"code" => string(3) "401"
"message" => string(12) "site is live"
"created" => NULL
"modified" => NULL
)
protected _changed => array(0)
protected _original_values => array(6) (
"id" => string(1) "1"
"name" => string(4) "Live"
"code" => string(3) "401"
"message" => string(12) "site is live"
"created" => NULL
"modified" => NULL
)
//php 5.6.21
protected _object => array(6) (
"id" => string(1) "1"
"name" => string(4) "Live"
"code" => string(3) "401"
"message" => string(12) "site is live"
"created" => NULL
"modified" => NULL
)
protected _changed => array(4) (
"id" => string(2) "id"
"name" => string(4) "name"
"code" => string(2) "code"
"message" => string(7) "message"
)
protected _original_values => array(0)