Fix issues in changed files
- Initializes $return in Process::insert - Update the type hint of dba::fetch - Remove unused $a parameter in worker_init() - Fix uses
This commit is contained in:
parent
ad88b6e3af
commit
f193f01a7d
|
@ -659,7 +659,7 @@ class dba {
|
||||||
/**
|
/**
|
||||||
* @brief Fetch a single row
|
* @brief Fetch a single row
|
||||||
*
|
*
|
||||||
* @param PDOStatement|mysqli_result|mysqli_stmt $stmt statement object
|
* @param mixed $stmt statement object
|
||||||
* @return array current row
|
* @return array current row
|
||||||
*/
|
*/
|
||||||
public static function fetch($stmt) {
|
public static function fetch($stmt) {
|
||||||
|
|
|
@ -4,11 +4,10 @@
|
||||||
* @brief Module for running the worker as frontend process
|
* @brief Module for running the worker as frontend process
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Friendica\Core\Worker;
|
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\Worker;
|
||||||
|
|
||||||
function worker_init($a){
|
function worker_init(){
|
||||||
|
|
||||||
if (!Config::get("system", "frontend_worker")) {
|
if (!Config::get("system", "frontend_worker")) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
use Friendica\Core\Worker;
|
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
use Friendica\Core\Worker;
|
||||||
|
|
||||||
// Ensure that worker.php is executed from the base path of the installation
|
// Ensure that worker.php is executed from the base path of the installation
|
||||||
if (!file_exists("boot.php") && (sizeof($_SERVER["argv"]) != 0)) {
|
if (!file_exists("boot.php") && (sizeof($_SERVER["argv"]) != 0)) {
|
||||||
|
|
|
@ -23,6 +23,8 @@ class Process extends BaseObject
|
||||||
*/
|
*/
|
||||||
public static function insert($command, $pid = null)
|
public static function insert($command, $pid = null)
|
||||||
{
|
{
|
||||||
|
$return = true;
|
||||||
|
|
||||||
dba::transaction();
|
dba::transaction();
|
||||||
|
|
||||||
if (!dba::exists('process', ['pid' => getmypid()])) {
|
if (!dba::exists('process', ['pid' => getmypid()])) {
|
||||||
|
|
Loading…
Reference in a new issue