diff options
| author | czaks <marcin@6irc.net> | 2014-04-29 21:18:17 +0200 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2014-04-29 21:18:17 +0200 |
| commit | 46802d3f1be8eef229539b2404baa752f8f670c3 (patch) | |
| tree | e852b4fd88b4fd7c38da0adb73b5a4d742cce32c /post.php | |
| parent | d57dcc5e6e786a2122c80e0e5074ab8390a73c1b (diff) | |
fix post event
Diffstat (limited to 'post.php')
| -rw-r--r-- | post.php | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -758,7 +758,11 @@ if (isset($_POST['delete'])) { } $post = (object)$post; - if ($error = event('post', $post)) { + $post->files = array_map(function($a) { return (object)$a; }, $post->files); + $error = event('post', $post); + $post->files = array_map(function($a) { return (array)$a; }, $post->files); + + if ($error) { undoImage((array)$post); error($error); } |
