We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8880
    • 29 Posts
    I just upgraded a Server to PHP 5.3 and that seemed to have broken phx:mo:

      Error:	strlen() expects parameter 1 to be string, array given	 
      Error type/ Nr.:	Warning - 2	 
      File:	/www/intranet-businessparc.ch/assets/plugins/phx/phx.parser.class.inc.php	 
      Line:	209	 
      Line 209 source:	 $grps = (strlen($modifier_value) > 0 ) ? explode(",",$modifier_value[$i]) :array();	
    


    I think PHP 5.3 is stricter with types. $modifier_value seems to be an array that is passed to strlen.

    I changed line 209 in phx.parser.class.inc.php from:
    $grps = (strlen($modifier_value) > 0 ) ? explode(",",$modifier_value[$i]) :array();

    to:
    $grps = (strlen($modifier_value[$i]) > 0 ) ? explode(",",$modifier_value[$i]) :array();


    Now everything seems to be working again.

    Could anyone please confirm, that this is actually the right fix to the problem?

    Thanks,
    Sascha
    • I think I’d file a bug in JIRA for this so it doesn’t get overlooked.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 8880
        • 29 Posts
        Would this go to ’Other MODx Add-Ons’?

        Never filed a bug before, so I might need a little help.
          • 3749
          • 24,544 Posts
          Quote from: endif at Oct 13, 2009, 06:46 AM

          Would this go to ’Other MODx Add-Ons’?

          Yes. Thanks for reporting this. smiley
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 8880
            • 29 Posts
            Done.