Fix potential bugs without expected behavior change
- Fix uninitialized variables - Fix potentially not set variables - Fix wrong parameter default value - Fix method scope - Fix missing return value
This commit is contained in:
parent
45ada943b4
commit
7f2dc40601
35 changed files with 87 additions and 67 deletions
|
@ -1252,6 +1252,8 @@ class Item extends BaseObject
|
|||
{
|
||||
$orig_item = $item;
|
||||
|
||||
$priority = PRIORITY_HIGH;
|
||||
|
||||
// If it is a posting where users should get notifications, then define it as wall posting
|
||||
if ($notify) {
|
||||
$item['wall'] = 1;
|
||||
|
@ -1261,8 +1263,6 @@ class Item extends BaseObject
|
|||
|
||||
if (is_int($notify)) {
|
||||
$priority = $notify;
|
||||
} else {
|
||||
$priority = PRIORITY_HIGH;
|
||||
}
|
||||
} else {
|
||||
$item['network'] = trim(defaults($item, 'network', Protocol::PHANTOM));
|
||||
|
@ -1850,7 +1850,7 @@ class Item extends BaseObject
|
|||
$cmd = 'wall-new';
|
||||
}
|
||||
|
||||
Worker::add(['priority' => PRIORITY_HIGH, 'dont_fork' => true], 'Notifier', $cmd, $current_post);
|
||||
Worker::add(['priority' => $priority, 'dont_fork' => true], 'Notifier', $cmd, $current_post);
|
||||
}
|
||||
|
||||
return $current_post;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue