We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22303 MODX Staff
    • 10,725 Posts
    Ok, the real MODx 0.9.6.2 RC1 (revision 3739) is now available from http://modxcms.com/beta.html -- updated at 10:39pm CST, May 22nd. If you downloaded it before this time, get the new one. tongue

    We’ll make a public announcement later tonight.
      • 22303 MODX Staff
      • 10,725 Posts
      Grrr; I screwed up! Updated again this morning at 11am CST.
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Rev 3741 of rc1 from svn has this warning returned every time I save a new TV. It is saved, however. Saving it again is fine. Of course, the TV has no rank key or value to retrieve from the database when it is first saved.

        Warning: array_combine() [function.array-combine]: Both parameters should have at least 1 element in /home/****/domains/****.com/public_html/manager/processors/save_tmplvars.processor.php on line 187

        Warning: Cannot modify header information - headers already sent by (output started at /home/****/domains/****.com/public_html/manager/processors/save_tmplvars.processor.php:187) in /home/****/domains/****.com/public_html/manager/processors/save_tmplvars.processor.php on line 100

        They’ve got phpinfo blocked "for security reasons" so I have written my own snippet to get some information.

        PHP version 5.2.4
        Server version Microsoft-IIS/6.5beta

        I added an if condition around the offending line...
            if(!empty($getRankArrayKey) && !empty($getRankArrayValue)) {
                $getRankArray = array_combine($getRankArrayKey,$getRankArrayValue);
            }
        

        and it seems to be working fine with no warnings.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 7231
          • 4,205 Posts
          I had this same problem and opened a ticket (jira) for it. Your solution worked for me as well grin However, is it a solution or a work around ?

          This error only happens on saving new TVs, editing existing ones do not give error.
            [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

            Something is happening here, but you don't know what it is.
            Do you, Mr. Jones? - [bob dylan]
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Well, if you look at the code, it gets those values from the database, but of course when saving a new tv the query will return empty, so there won’t be anything for the array_combine function to work with. So I would say this is as good a fix as any; you somehow need to find out if there are any values before calling the array_combine function. I don’t see a better way; maybe somebody else will.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 21257 MODX Staff
              • 730 Posts
              I fixed it in a different way on May 28 as r.3773-3774 to get rid of array_combine because it’s a php5-only function.

              http://svn.modxcms.com/crucible/browse/~author=netprophet/modx/branches/0.9.6/manager/processors/save_tmplvars.processor.php?r1=3629&r2=3774&u=3&ignore=&k=

              It hasn’t made it into a release candidate yet.
                Mike Schell
                Lead Developer, MODX Cloud
                Email: [email protected]
                GitHub: https://github.com/netProphET/
                Twitter: @mkschell
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                I was wondering about that...I had thought it was php 5.
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 4018
                  • 1,131 Posts
                  Also, it looks like the 3.1.0.1 version of TinyMCE is pretty stable now so...I’m gonna update the current 0.9.6.2 dev branch with it. Would like to see this in the next RC for testing. laugh

                  I’m also working through some remaining issues in the bug tracker. Hopefully will be able to implement and/or fix some of this stuff for the next RC.

                  Jeff
                    Jeff Whitfield

                    "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."