Branch: Tag:

2010-01-21

2010-01-21 10:03:27 by 0

Make sure get_extra() always returns a mapping. Should prevent the
backtrace reported in [bug 5073].

Rev: lib/modules/Search.pmod/Queue.pmod/MySQL.pike:1.24

131:   mapping get_extra( Standards.URI uri )   {    if( extra_data[(string)uri] ) -  return extra_data[(string)uri]; +  return extra_data[(string)uri] || ([ ]);    array r = db->query( "SELECT md5,recurse,stage,template "    "FROM "+table+" WHERE uri_md5=%s", to_md5((string)uri) ); -  if( sizeof( r ) ) -  return r[0]; -  +  return (sizeof(r) && r[0]) || ([ ]);   }      static int empty_count;