diff --git a/include/swoole_coroutine.h b/include/swoole_coroutine.h index ff19aff2ad..4f45e9988b 100644 --- a/include/swoole_coroutine.h +++ b/include/swoole_coroutine.h @@ -153,7 +153,7 @@ class Coroutine { #ifdef SW_USE_THREAD_CONTEXT try { return (new Coroutine(fn, args))->run(); - } catch (const std::system_error &e) { + } catch (const std::system_error& e) { swoole_set_last_error(e.code().value()); swoole_warning("failed to create coroutine, Error: %s[%d]", e.what(), swoole_get_last_error()); return -1; diff --git a/src/os/async_thread.cc b/src/os/async_thread.cc index 8fca0974b9..7b1bdd8f45 100644 --- a/src/os/async_thread.cc +++ b/src/os/async_thread.cc @@ -319,7 +319,7 @@ void ThreadPool::create_thread(const bool is_core_worker) { try { std::thread *_thread = new std::thread([this, is_core_worker]() { main_func(is_core_worker); }); threads[_thread->get_id()] = _thread; - } catch (const std::system_error &e) { + } catch (const std::system_error& e) { swoole_sys_notice("create aio thread failed, please check your system configuration or adjust aio_worker_num"); return; } diff --git a/tests/swoole_thread/map2array.phpt b/tests/swoole_thread/map2array.phpt index 6682d65986..0f1949ce41 100644 --- a/tests/swoole_thread/map2array.phpt +++ b/tests/swoole_thread/map2array.phpt @@ -12,7 +12,7 @@ use Swoole\Thread\Map; require __DIR__ . '/../include/bootstrap.php'; -$LURDATE = new Map; +$LURDATE = new Map(); $time = 'abc'; $LURDATE[$time] = new Map(["saaa" => 1111]); $ls = $LURDATE[$time]->toArray();