Comments (4)
Per PHP.net,
An E_WARNING level error is generated if filename cannot be found
. That warning doesn't seem to be caught by UF, so it should just end up in the PHP error log.
FYI, most PHP install will suppress E_WARNING by default. try/catch doesn't work because a warning is not an exception, so there's no way to handle this, only the false
return type.
from userfrosting.
I fixed this in userfrosting/framework@4bfc0fc on the V5 branch. A FileNotFoundException
will be thrown if the path is not found, as shown in new test. Note the path can still be null
without an exception being thrown.
I don't plan on fixing for V4, but a PR would be considered.
from userfrosting.
file_get_contents
should return false :
The function returns the read data or false on failure.
Which should throw an exception in YamlFileLoader
https://github.com/userfrosting/framework/blob/80bb8080506c16431a5e81080fafc301d3dc1e35/src/Support/Repository/Loader/YamlFileLoader.php#L31-L33
You could test it manually using
$loader = new YamlFileLoader('BadDirectory/ThisIsNotARealFile.yaml');
$items = $loader->load();
and post the result.
from userfrosting.
I think RequestSchema
should load with the $skipMissing
flag as false
here :
https://github.com/userfrosting/framework/blob/80bb8080506c16431a5e81080fafc301d3dc1e35/src/Fortress/RequestSchema.php#L42
$skipMissing
is true by default here :
https://github.com/userfrosting/framework/blob/80bb8080506c16431a5e81080fafc301d3dc1e35/src/Support/Repository/Loader/FileRepositoryLoader.php#L78-L82
And won't throw an exception here :
https://github.com/userfrosting/framework/blob/80bb8080506c16431a5e81080fafc301d3dc1e35/src/Support/Repository/Loader/FileRepositoryLoader.php#L53
Moving it to false would be a big change that could impact other system though. I should probably test for this situation on the V5 branch.
from userfrosting.
Related Issues (20)
- Change .env UF_MODE not working HOT 4
- All of the vendor files seem to be throwing exceptions HOT 1
- Overriding existing values for same language ignored HOT 1
- Native install on PHP 8.08 install fails due to eventdispatcher incompatibility between rockettheme and symphony
- `Mailer` does not fully clear message state after sending message, for example Reply-To header, leading to unexpected behavior HOT 6
- Raise minimum NodeJS from `^12.17.0 || >=14.0.0` to `>=14.0.0` HOT 1
- ReturnTypeWillChange warning with PHP 8.1 HOT 5
- Create logic out of database schema. HOT 1
- Missing default permission HOT 6
- [V4 & V5] HTML in `page_description` block bleed in the template
- [FR] Order migrations by sprinkle HOT 3
- Blank user alert on account creation, when UF5 can't connect to SMTP HOT 1
- [Sprinkle-Admin] User_defaults.group doesn't work on Form "Create User" HOT 3
- [Bug] Default handling for "renderError.ufModal"
- Auto publish npm version via GitHub Action
- Add PHP 8.3 official support and testing HOT 1
- Update to Laravel 10 HOT 1
- Possible Security issue, but could be just my environment. HOT 3
- Test against MariaDB
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 userfrosting.