Occurs when deleting a peer, and after the related bug on table mdl_mnet_rpc2host has been fixed.
Fatal error: __clone method called on non-object in D:\wwwroot\WWW-PRF_VMOODLE-PHP\auth\mnet\auth.php on line 1230
(this is a 1.9.1) ref.
occurs when cloning forth and back $_SESSION for cache :
function end_local_sessions(&$sessionArray) {
global $CFG;
if (is_array($sessionArray)) {
$start = ob_start();
$uc = ini_get('session.use_cookies');
ini_set('session.use_cookies', false);
print_object($_SESSION);
$sesscache = clone($_SESSION); // THIS CLONE SEEMS BEING ILLEGAL $_SESSION is not a "created object"
$sessidcache = session_id();
session_write_close();
unset($_SESSION);
The subsequent back cloning provoques an error also.
Fix : just don't try to clone the global hash here (just simply affect it). I don't know the exact consequences but seems work normally.