XPressME Integration Kit

Trac

Changeset 836 for branches


Ignore:
Timestamp:
Feb 9, 2013, 9:01:42 AM (12 years ago)
Author:
toemon
Message:

PHP5.4 Fatal error: Call-time pass-by-reference fixed #424

Location:
branches/Ver2.4/xpressme_integration_kit/include
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/Ver2.4/xpressme_integration_kit/include/xml.php

    r615 r836  
    1616if( ! function_exists( 'xpress_XML_unserialize' ) ) : // d3pipe Used function 
    1717function & xpress_XML_unserialize(&$xml){ 
    18         $xml_parser = &new xpress_XML(); 
     18        if ( version_compare(PHP_VERSION, '5.0.0', '>')) { 
     19                eval('$xml_parser = new xpress_XML();'); 
     20        }else { 
     21                eval('$xml_parser = &new xpress_XML();'); 
     22        } 
    1923        $data = &$xml_parser->parse($xml); 
    2024        $xml_parser->destruct(); 
  • branches/Ver2.4/xpressme_integration_kit/include/xpress_block_header.php

    r719 r836  
    3636                { 
    3737                        $xml_data = str_replace('<?xml version="1.0" encoding="EUC-JP" ?>', '<?xml version="1.0" encoding="UTF-8" ?>', $xml_data); 
    38                         $ans = mb_convert_variables('UTF-8' , 'EUC-JP', &$xml_data); //EUC-JP to UTF-8 
     38                        $ans = mb_convert_variables('UTF-8' , 'EUC-JP', $xml_data); //EUC-JP to UTF-8 
    3939                        $ret = @xpress_XML_unserialize($xml_data); 
    40                         $ans = mb_convert_variables('EUC-JP' , 'UTF-8', &$ret); //UTF-8 to EUC-JP 
     40                        $ans = mb_convert_variables('EUC-JP' , 'UTF-8', $ret); //UTF-8 to EUC-JP 
    4141                } else { 
    4242                        $ret = xpress_XML_unserialize($xml_data); 
  • branches/Ver2.4/xpressme_integration_kit/include/xpress_block_render.php

    r835 r836  
    3535                { 
    3636                        $xml_data = str_replace('<?xml version="1.0" encoding="EUC-JP" ?>', '<?xml version="1.0" encoding="UTF-8" ?>', $xml_data); 
    37                         $ans = mb_convert_variables('UTF-8' , 'EUC-JP', &$xml_data); //EUC-JP to UTF-8 
     37                        $ans = mb_convert_variables('UTF-8' , 'EUC-JP', $xml_data); //EUC-JP to UTF-8 
    3838                        $ret = @xpress_XML_unserialize($xml_data); 
    39                         $ans = mb_convert_variables('EUC-JP' , 'UTF-8', &$ret); //UTF-8 to EUC-JP 
     39                        $ans = mb_convert_variables('EUC-JP' , 'UTF-8', $ret); //UTF-8 to EUC-JP 
    4040                } else { 
    4141                        $ret = xpress_XML_unserialize($xml_data); 
     
    187187        } 
    188188 
    189                 $tpl =& new XoopsTpl() ; 
    190                 $tpl->template_dir = $xoops_config->module_path . '/templates'; 
     189                if ( version_compare(PHP_VERSION, '5.0.0', '>')) { 
     190                        eval('$tpl = new XoopsTpl();'); 
     191                }else { 
     192                        eval('$tpl = & new XoopsTpl();'); 
     193                } 
     194                $tpl->template_dir = $xoops_config->module_path . '/templates'; 
    191195                if (!$tpl->template_exists($templates_file)){ 
    192196                        $src_file_path = $xoops_config->module_path . '/templates/' .$mydirname. '_' . str_replace(".php", ".html", $block_function_name); 
Note: See TracChangeset for help on using the changeset viewer.