Love Fuel?
Donate
About
Forums
Discussions
Login
FuelPHP Forums
Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
General
An error occurs at log folder change
takatsuka
August 2016
I am glad to meet you.
My English ability is not native level.
I use FuelPHP1.8. thank you.
When a log folder change, it seems to have possibilities to become the error.
When plural is_dir and mkdir are performed to a multi thread, an exception in mkdir.
I made a modified cord. would like an opinion.
Fuel\Core\Log::initialize
before
if ( ! is_dir($rootpath))
{
mkdir($rootpath, 0777, true);
chmod($rootpath, $permission);
}
if ( ! is_dir($filepath))
{
mkdir($filepath, 0777, true);
chmod($filepath, $permission);
}
modified
if ( ! is_dir($rootpath))
{
try{
mkdir($rootpath, 0777, true);
}catch( \PhpErrorException $e ){
if( ! is_dir($rootpath) ) throw $e;
}
chmod($rootpath, $permission);
}
if ( ! is_dir($filepath))
{
try{
mkdir($filepath, 0777, true);
}catch( \PhpErrorException $e ){
if( ! is_dir($filepath) ) throw $e;
}
chmod($filepath, $permission);
}
Harro
August 2016
Has been fixed here:
https://github.com/fuel/core/compare/8b07b26ab045...c4fe3b4caec7
You might need to switch to 1.9/develop or to backport it manually, pending a new hotfix release.
takatsuka
August 2016
Thank you.
I look forward to 1.9 release.
Add a Comment
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
Categories
All Discussions
5,089
General
↳ General
3,364
↳ Job Board
13
↳ Installation & Setup
214
Packages
↳ Oil
213
↳ Orm
700
↳ Auth
261
Development
↳ Tips and Tutorials
126
↳ Code share
145
↳ Applications
52
In this Discussion
Harro
August 2016
takatsuka
August 2016