Comments (3)
convert in PKP\cliTool\traits\ConvertLogFile initially set $isSuccessful to false and only sets it to true once it has successfully converted an entry.
pkp-lib/classes/cliTool/traits/ConvertLogFile.php
Lines 131 to 132 in c111708
pkp-lib/classes/cliTool/traits/ConvertLogFile.php
Lines 225 to 226 in c111708
This logic fails if:
- the file's size is zero and
feof(…)
immediately returns false; or - the while loop never gets to its end because all of the lines trigger one of the
continue
statements
from pkp-lib.
Relate to handling of $isSuccessful, after the first successful entry sets $isSuccessful to true it is never set back to false. This means the I8508_ConvertCurrentLogFile migration passes if and whenever at least one log entry is successfully converted.
The logics like this don't set $isSuccessful back to false.
pkp-lib/classes/cliTool/traits/ConvertLogFile.php
Lines 142 to 145 in c111708
from pkp-lib.
Hi @SydneyUni-Jim,
Yes, I think we need to somehow consider -- at least report it correctly -- if the file is empty (also in case only continue statements are called).
But, else, if any other problem occurs (like invalid line) I think it is OK: we convert the lines that can be converted and report the existing issues, so that user can act as needed.
from pkp-lib.
Related Issues (20)
- Outstanding editorial task automatic email content going wrong HOT 5
- Button Orders in OJS
- Side Modal / Pop-up Closing behaviour
- Update StageAssignment model to use eloquence HasCamelCasing trait HOT 2
- Globe icon shows wrong color when more languages are completed than available
- Notification Actions Causes Error
- TypeError: Cannot read properties of null (reading 'match') when adding keywords HOT 1
- [ops-3.4.0-5, php 8.3.8.r2] the latest preprint of the same day not coming on top HOT 1
- REVIEW_ASSIGNMENT_CONSIDERED and REVIEW_ASSIGNMENT_NEW are never granted HOT 1
- Update eloquent models use to HasCamelCasing trait
- FieldUploadImage and FieldUpload doesn't work as Theme Options
- Reserve the "index" context for the site context
- Fix usage/implementation of $urlLocaleForPage at the PKPRouter::url() HOT 2
- Register constants in Smarty HOT 1
- Upgrade fails if there are no files in usageEventLogs HOT 3
- Limited data loss at settings tables when migrating from a version smaller than 3.3.0 HOT 4
- Pubmed export plugin fails when exporting non-published article
- Convert Notifications to Eloquent
- User is incorrectly redirected after installing plugin in admin settings wizard
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pkp-lib.