On Thu, Nov 24, 2011 at 11:05 AM, <de...@lucato.it> wrote: > On 24 November 2011 01:38, Stas Malyshev <smalys...@sugarcrm.com> wrote: > > Hi! > > > >> But neither is introducing a potential bomb of the kind that the 'date' > >> saga > >> created. The problem this change IS causing is likely to hit many live > >> sites > > > > The claim that many live sites actually regularly use string multiple > string > > offsets to distinguish strings from arrays sounds implausible to me. > > > > > Hi, > > I hadn't the opportunity to install php 5.4 to test this, so I was > wondering if someone could test how would this code behave ? > > ########### > if ( > !isset( $widget_options['dashboard_incoming_links'] ) > || !isset( $widget_options['dashboard_incoming_links']['home'] ) > || $widget_options['dashboard_incoming_links']['home'] != > get_option('home') ) > ########### > > Is that correct saying that if the first condition is false the second > will always be true ? > > Note: that's a piece of Wordpress > > hi.
you can also test it http://codepad.viper-7.com/ if you don't want/can't have a build from source. What does get_option('home') return? >From a quick glance, I think that you are safe, except if you get a string instead of an array(either for $widget_options or $widget_options['dashboard_incoming_links']), and the first character of that string is a slash and your get_option('home') returns a slash also. in which case your code will behave as it would get a correct array having $widget_options['dashboard_incoming_links']['home'] = '/' -- Ferenc Kovács @Tyr43l - http://tyrael.hu