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

Warning: fseek(): supplied resource is not a valid stream resource #8

Closed
andruha opened this issue Apr 27, 2018 · 0 comments
Closed

Comments

@andruha
Copy link
Contributor

andruha commented Apr 27, 2018

yii\base\ErrorException: fseek(): supplied resource is not a valid stream resource in /var/www/vendor/twistor/flysystem-stream-wrapper/src/FlysystemStreamWrapper.php:421
Stack trace:
#0 /var/www/vendor/yiisoft/yii2/web/UploadedFile.php(164): Twistor\FlysystemStreamWrapper->stream_flush()
#1 /var/www/vendor/yiisoft/yii2/web/UploadedFile.php(164): ::move_uploaded_file()
#2 /var/www/vendor/yii-dream-team/yii2-upload-behavior/src/FileUploadBehavior.php(223): yii\web\UploadedFile->saveAs()
#3 /var/www/vendor/yiisoft/yii2/base/Component.php(627): yiidreamteam\upload\ImageUploadBehavior->afterSave()
#4 /var/www/vendor/yiisoft/yii2/base/Component.php(627): ::call_user_func:{/var/www/vendor/yiisoft/yii2/base/Component.php:627}()
#5 /var/www/vendor/yiisoft/yii2/db/BaseActiveRecord.php(991): common\models\Image->trigger()
#6 /var/www/vendor/yiisoft/yii2/db/ActiveRecord.php(526): common\models\Image->afterSave()
#7 /var/www/vendor/yiisoft/yii2/db/ActiveRecord.php(481): common\models\Image->insertInternal()
#8 /var/www/vendor/yiisoft/yii2/db/BaseActiveRecord.php(669): common\models\Image->insert()
#9 /var/www/vendor/yiisoft/yii2/db/BaseActiveRecord.php(1571): common\models\Image->save()
#10 /var/www/vendor/yiisoft/yii2/db/BaseActiveRecord.php(1341): common\models\Product->bindModels()
#11 /var/www/vendor/la-haute-societe/yii2-save-relations-behavior/src/SaveRelationsBehavior.php(427): common\models\Product->link()
#12 /var/www/vendor/yiisoft/yii2/base/Component.php(627): lhs\Yii2SaveRelationsBehavior\SaveRelationsBehavior->afterSave()
#13 /var/www/vendor/yiisoft/yii2/base/Component.php(627): ::call_user_func:{/var/www/vendor/yiisoft/yii2/base/Component.php:627}()
#14 /var/www/vendor/yiisoft/yii2/db/BaseActiveRecord.php(991): common\models\Product->trigger()
#15 /var/www/common/models/Product.php(140): common\models\Product->afterSave()
#16 /var/www/vendor/yiisoft/yii2/db/BaseActiveRecord.php(816): common\models\Product->afterSave()
#17 /var/www/vendor/yiisoft/yii2/db/ActiveRecord.php(596): common\models\Product->updateInternal()
#18 /var/www/vendor/yiisoft/yii2/db/BaseActiveRecord.php(672): common\models\Product->update()
#19 /var/www/backend/forms/ProductForm.php(88): common\models\Product->save()
#20 /var/www/vendor/yii2tech/admin/actions/Update.php(46): backend\forms\ProductForm->save()
#21 /var/www/vendor/yiisoft/yii2/base/Action.php(94): yii2tech\admin\actions\Update->run()
#22 /var/www/vendor/yiisoft/yii2/base/Action.php(94): ::call_user_func_array:{/var/www/vendor/yiisoft/yii2/base/Action.php:94}()
#23 /var/www/vendor/yiisoft/yii2/base/Controller.php(157): yii2tech\admin\actions\Update->runWithParams()
#24 /var/www/vendor/yiisoft/yii2/base/Module.php(528): backend\controllers\ProductController->runAction()
#25 /var/www/vendor/yiisoft/yii2/web/Application.php(103): yii\web\Application->runAction()
#26 /var/www/vendor/yiisoft/yii2/base/Application.php(386): yii\web\Application->handleRequest()
#27 /var/www/backend/web/index.php(17): yii\web\Application->run()
#28 {main}

Flysystem adapter https://github.com/ArgentCrusade/flysystem-selectel
Stream close after request by Guzzle https://github.com/ArgentCrusade/selectel-cloud-storage/blob/master/src/FileUploader.php#L26 and we have such error

Need add check is_resource($this->handle) to stream_flush and stream_close methods

andruha added a commit to andruha/flysystem-stream-wrapper that referenced this issue Apr 27, 2018
twistor added a commit that referenced this issue Nov 14, 2018
#8 Add resource check on stream_flush and stream_close
@twistor twistor closed this as completed Nov 14, 2018
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

No branches or pull requests

2 participants