Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional check for existance of install.log to prevent warning in console #916

Closed
wants to merge 4 commits into from

Conversation

snky1987
Copy link

@snky1987 snky1987 commented Jan 6, 2015

When I got an error mentioned in #904 comment and clicked Try Again I received error in console:


Warning: fopen(foo\bar\Local\Temp\install.log): failed to open stream: No such file or directory in foo\bar\Projects\magento2\setup\module\Magento\Setup\src\Model\WebLogger.php on line 59

Warning: fseek() expects parameter 1 to be resource, boolean given in foo\bar\magento2\setup\module\Magento\Setup\src\Model\WebLogger.php on line 148

Warning: fgets() expects parameter 1 to be resource, boolean given in foo\bar\magento2\setup\module\Magento\Setup\src\Model\WebLogger.php on line 150

Warning: fclose() expects parameter 1 to be resource, boolean given in foo\bar\magento2\setup\module\Magento\Setup\src\Model\WebLogger.php on line 69

Warning: fopen(foo\bar\Local\Temp\install.log): failed to open stream: No such file or directory in foo\bar\magento2\setup\module\Magento\Setup\src\Model\WebLogger.php on line 59

Warning: fseek() expects parameter 1 to be resource, boolean given in foo\bar\magento2\setup\module\Magento\Setup\src\Model\WebLogger.php on line 148

Warning: fgets() expects parameter 1 to be resource, boolean given in foo\bar\magento2\setup\module\Magento\Setup\src\Model\WebLogger.php on line 150

Warning: fclose() expects parameter 1 to be resource, boolean given in foo\bar\magento2\setup\module\Magento\Setup\src\Model\WebLogger.php on line 69
{"progress":"0","success":true,"console":[]}

It may be just some kind of silly error due to progress process run before install.log file is created. To prevent it I added simple is_resource check for fclose function and also on open() function to create file if doesn't exists.

I didn't have this issue during next 10 installation processes after this fix.

Michal Malinowski added 4 commits January 6, 2015 09:57
…nstallation error due to not created log file (reproduced several times by Trying Install Again without refresh installation process page after other error)
…ting anymore (most probably have been fixed and page wasn't refreshed)
@snky1987
Copy link
Author

snky1987 commented Jan 6, 2015

With new pull request added simple solution for #919 issue.

@snky1987 snky1987 closed this Jan 6, 2015
magento-team pushed a commit that referenced this pull request Mar 12, 2017
magento-team pushed a commit that referenced this pull request Dec 12, 2017
 - Merge Pull Request magento-engcom/magento2ce#916 from RomaKis/magento2:8862
 - Merged commits:
   1. 1ef70f0
magento-team pushed a commit that referenced this pull request Dec 12, 2017
EngCom] Public Pull Requests - 2.2-develop
 - MAGETWO-85520: Remove @escapenotverified from documentation #12639
 - MAGETWO-85317: 12526: Currency change, Bank Transfer but checkout page shows "Your credit card will be charged for" #993
 - MAGETWO-85298: 8011: Strip Tags from attribute. #968
 - MAGETWO-85294: 12535: Product change sku via repository. #984
 - MAGETWO-85274: Update CrontabManager.php #12610
 - MAGETWO-84994: 8862: Can't emptying values by magento 2 api #916
magento-engcom-team added a commit that referenced this pull request Sep 10, 2019
 - Merge Pull Request magento/graphql-ce#916 from pmclain/graphql-ce:issue/875
 - Merged commits:
   1. 28596de
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant