Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F9574669
D16.id31.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
768 B
Referenced Files
None
Subscribers
None
D16.id31.diff
View Options
diff --git a/includes/workspaces/WorkspaceConfiguration.php b/includes/workspaces/WorkspaceConfiguration.php
--- a/includes/workspaces/WorkspaceConfiguration.php
+++ b/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
Mon, Jun 9, 09:48 (11 h, 25 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2716073
Default Alt Text
D16.id31.diff (768 B)
Attached To
Mode
D16: Detect JSON issue parsing workspace configuration file.
Attached
Detach File
Event Timeline
Log In to Comment