Add validation in the installer to prevent warnings in the code

This commit is contained in:
Julio Cesar Laura
2012-09-26 12:56:24 -04:00
parent 47e22c2eae
commit 441230e4cb
2 changed files with 89 additions and 73 deletions

View File

@@ -147,6 +147,9 @@ class Controller
*/ */
public function setHttpRequestData($data) public function setHttpRequestData($data)
{ {
if (!is_object($this->__request__)) {
$this->__request__ = new stdclass();
}
if( is_array($data) ) { if( is_array($data) ) {
while( $var = each($data) ) while( $var = each($data) )
$this->__request__->$var['key'] = $var['value']; $this->__request__->$var['key'] = $var['value'];

View File

@@ -118,6 +118,19 @@ class Installer extends Controller
preg_match('/[0-9\.]+/', $phpVer, $match); preg_match('/[0-9\.]+/', $phpVer, $match);
$phpVerNum = (float) $match[0]; $phpVerNum = (float) $match[0];
$info = new stdclass();
$info->php = new stdclass();
$info->mysql = new stdclass();
$info->mssql = new stdclass();
$info->openssl = new stdclass();
$info->curl = new stdclass();
$info->dom = new stdclass();
$info->gd = new stdclass();
$info->multibyte = new stdclass();
$info->soap = new stdclass();
$info->ldap = new stdclass();
$info->memory = new stdclass();
$info->php->version = phpversion(); $info->php->version = phpversion();
$info->php->result = $phpVerNum > 5.1 ? true : false; $info->php->result = $phpVerNum > 5.1 ? true : false;