Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F12430230
D16.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
776 B
Referenced Files
None
Subscribers
None
D16.diff
View Options
Index: includes/workspaces/WorkspaceConfiguration.php
===================================================================
--- includes/workspaces/WorkspaceConfiguration.php
+++ includes/workspaces/WorkspaceConfiguration.php
@@ -193,9 +193,10 @@
* Loads a WorkspaceConfiguration instance deserializing a JSON file
*/
public static function loadFromFile ($file, $context) {
- return self::loadFromObject(
- json_decode(file_get_contents($file)),
- $context
- );
+ $object = json_decode(file_get_contents($file));
+ if ($object === null) {
+ throw new Exception("Can't parse configuration file: " . json_last_error_msg());
+ }
+ return self::loadFromObject($object, $context);
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 6, 13:51 (17 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3139585
Default Alt Text
D16.diff (776 B)
Attached To
Mode
D16: Detect JSON issue parsing workspace configuration file.
Attached
Detach File
Event Timeline
Log In to Comment