events, continued. Also better regex matching accounting for empty elements

This commit is contained in:
Friendika
2011-06-07 22:13:07 -07:00
parent 33fe26ecb0
commit e2f1540f25
7 changed files with 43 additions and 43 deletions

View File

@@ -78,7 +78,7 @@ function message_post(&$a) {
$match = null;
if(preg_match_all("/\[img\](.+?)\[\/img\]/",$body,$match)) {
if(preg_match_all("/\[img\](.*?)\[\/img\]/",$body,$match)) {
$images = $match[1];
if(count($images)) {
foreach($images as $image) {