CodeIgniter Forums
dbutil backup - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: dbutil backup (/showthread.php?tid=62178)



dbutil backup - el_tou4r3g - 06-16-2015

from the CI doc i see in the "Backup Your Database" section

// Backup your entire database and assign it to a variable
$backup =& $this->dbutil->backup();

but it brings a runtime error:

Severity: Runtime Notice
Message: Only variables should be assigned by reference

from Php manual
http://php.net/manual/en/language.operators.assignment.php

As of PHP 5, the new operator returns a reference automatically, so assigning the result of new by reference results in an E_DEPRECATED message in PHP 5.3 and later, and an E_STRICT message in earlier versions.


simply removing the & works fine.
please update the doc


RE: dbutil backup - sparky672 - 06-23-2015

I'm seeing the same thing still in the documentation.

Thanks for posting the solution.


RE: dbutil backup - Narf - 06-23-2015

https://github.com/bcit-ci/CodeIgniter/commit/105749b1bd60a591398168dc8da2a8a894a296b4