+ $matches = array();
+ common_debug(get_called_class().': media_ids=='._ve($this->trimmed('media_ids')));
+ if (preg_match_all('/\d+/', $this->trimmed('media_ids'), $matches) !== false) {
+ foreach (array_unique($matches[0]) as $match) {
+ try {
+ $this->media_ids[$match] = File::getByID($match);
+ } catch (EmptyIdException $e) {
+ // got a zero from the client, at least Twidere does this on occasion
+ } catch (NoResultException $e) {
+ // File ID was not found. Do we abort and report to the client?
+ }
+ }
+ }