XPressME Integration Kit

Trac


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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.