Added is_object()
This commit is contained in:
@@ -318,7 +318,7 @@ class pagedTable
|
||||
else
|
||||
trigger_Error('Warning: sql query is empty',E_USER_WARNING);
|
||||
// Config attributes from XMLFORM file
|
||||
$myAttributes=get_class_vars(is_object($this) && get_class($this));
|
||||
$myAttributes=get_class_vars(get_class($this));
|
||||
foreach ($this->xmlForm->xmlform->tree->attribute as $atrib => $value)
|
||||
if (array_key_exists( $atrib, $myAttributes)){
|
||||
eval('settype($value,gettype($this->'.$atrib.'));');
|
||||
@@ -637,8 +637,8 @@ class pagedTable
|
||||
$this->xmlForm->setDefaultValues();
|
||||
$this->xmlForm->setValues( $result );
|
||||
$this->xmlForm->fields[ $this->fields[$r]['Name'] ]->mode = 'view';
|
||||
if ((array_search( 'rendergrid', get_class_methods(is_object($this) && get_class($this->xmlForm->fields[ $this->fields[$r]['Name'] ])) )!==FALSE)
|
||||
||(array_search( 'renderGrid', get_class_methods(is_object($this) && get_class($this->xmlForm->fields[ $this->fields[$r]['Name'] ])) )!==FALSE)) {
|
||||
if ((array_search( 'rendergrid', get_class_methods( get_class($this->xmlForm->fields[ $this->fields[$r]['Name'] ])) )!==FALSE)
|
||||
||(array_search( 'renderGrid', get_class_methods( get_class($this->xmlForm->fields[ $this->fields[$r]['Name'] ])) )!==FALSE)) {
|
||||
$htmlField = $this->xmlForm->fields[ $this->fields[$r]['Name'] ]->renderGrid( array($value) , $this->xmlForm );
|
||||
$this->tpl->assign( "value" , $htmlField[0] );
|
||||
} else {
|
||||
|
||||
@@ -111,7 +111,7 @@ class WebResource
|
||||
if (!function_exists('json_encode')) {
|
||||
G::LoadThirdParty('pear/json','class.json');
|
||||
function json_encode(&$value) {
|
||||
$json=& new Services_JSON;
|
||||
$json= new Services_JSON;
|
||||
return $json->encode($value);
|
||||
}
|
||||
}
|
||||
@@ -119,7 +119,7 @@ if (!function_exists('json_encode')) {
|
||||
if (!function_exists('json_decode')) {
|
||||
G::LoadThirdParty('pear/json','class.json');
|
||||
function json_decode(&$value) {
|
||||
$json=& new Services_JSON;
|
||||
$json= new Services_JSON;
|
||||
return $json->decode($value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ class ymlTestCases
|
||||
{
|
||||
$results=array();
|
||||
//$this->addToPlan( $count, $start );
|
||||
$functions=get_class_methods(is_object($testerObject) && get_class($testerObject) );
|
||||
$functions=get_class_methods( get_class($testerObject) );
|
||||
foreach($functions as $id=>$fn)
|
||||
$functions[$id]=strtolower($fn);
|
||||
foreach($this->testCases as $index => $testCase){
|
||||
|
||||
4
gulliver/thirdparty/pear/PEAR/Autoloader.php
vendored
4
gulliver/thirdparty/pear/PEAR/Autoloader.php
vendored
@@ -38,7 +38,7 @@ require_once "PEAR.php";
|
||||
* methods, an instance of each class providing separated methods is
|
||||
* stored and called every time the aggregated method is called.
|
||||
*
|
||||
* @author Stig S<>ther Bakken <ssb@php.net>
|
||||
* @author Stig S<>ther Bakken <ssb@php.net>
|
||||
*/
|
||||
class PEAR_Autoloader extends PEAR
|
||||
{
|
||||
@@ -146,7 +146,7 @@ class PEAR_Autoloader extends PEAR
|
||||
$classname = strtolower($classname);
|
||||
reset($this->_method_map);
|
||||
while (list($method, $obj) = each($this->_method_map)) {
|
||||
if (get_class($obj) == $classname) {
|
||||
if (is_object($obj) && get_class($obj) == $classname) {
|
||||
unset($this->_method_map[$method]);
|
||||
$ok = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user