Menu

Advanced HTML block shows errors

Help
xiaofo
2018-10-01
2018-10-02
  • xiaofo

    xiaofo - 2018-10-01

    I choose the GEDCOM Statistics template,It shows errors:

    ERROR 8: Array to string conversion
    0 Error occurred on line 216 of file class_stats.php in function getTags
    1 called from line 121 of file block_htmlplus.php in function print_htmlplus_block
    2 called from line 1 of file index.php(283) : eval()'d code in function eval
    3 called from line 283 of file index.php
    
    Notice: Array to string conversion in /home/wwwroot/jiapu/includes/classes/class_stats.php on line 216
    
    ERROR 8: Undefined property: stats_compat::$Array
    0 Error occurred on line 216 of file class_stats.php in function getTags
    1 called from line 121 of file block_htmlplus.php in function print_htmlplus_block
    2 called from line 1 of file index.php(283) : eval()'d code in function eval
    3 called from line 283 of file index.php
    
    Notice: Undefined property: stats_compat::$Array in /home/wwwroot/jiapu/includes/classes/class_stats.php on line 216
    
    Fatal error: Uncaught Error: Function name must be a string in /home/wwwroot/jiapu/includes/classes/class_stats.php:216 Stack trace: #0 /home/wwwroot/jiapu/blocks/block_htmlplus.php(121): stats->getTags('\xE7\x9D\xA2\xE5\xAE\x81\xE7\x8E\x8B\xE6\xB0\x8F\xE4\xB8\x96...') #1 /home/wwwroot/jiapu/index.php(283) : eval()'d code(1): print_htmlplus_block(false, Array, 'main', 0) #2 /home/wwwroot/jiapu/index.php(283): eval() #3 {main} thrown in /home/wwwroot/jiapu/includes/classes/class_stats.php on line 216
    
     
  • Gerry Kroll

    Gerry Kroll - 2018-10-01

    Please post the text of your Advanced HTML block here.

     
    • xiaofo

      xiaofo - 2018-10-02

      I choose to use a template or enter the following, the same error will occur.
      Advanced HTML block text:

      #totalRecords#

       
  • Gerry Kroll

    Gerry Kroll - 2018-10-02

    Please try the attached file class_stats.php.

    This file replaces file /includes/classes/class_stats.php . It also contains the fixes identified earlier concerning age-related statistics.

    Please let me know whether this fixes your problem.

    edit: Attached file was replaced with the copy from SVN 7210 . No code changes from the previously posted attachment.

     

    Last edit: Gerry Kroll 2018-10-02
    • xiaofo

      xiaofo - 2018-10-02

      Thank you very much, it is very useful.
      Now it works very well.

       

Log in to post a comment.