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

Fix issue #610 #615

Merged
merged 1 commit into from Feb 14, 2016
Merged

Fix issue #610 #615

merged 1 commit into from Feb 14, 2016

Conversation

MatonAnthony
Copy link
Collaborator

Use the mozillal10n JSON class instead of json_encode()
Fix issue #610

@@ -1,5 +1,6 @@
<?php
namespace Transvision;
use Zend\Json\Json;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why Zend ? :)

@@ -78,7 +80,8 @@ public static function getSupportedRepositories()
// Read list of repositories from supported_repositories.json
$file_name = APP_SOURCES . 'supported_repositories.json';
if (file_exists($file_name)) {
$json_repositories = json_decode(file_get_contents($file_name), true);
$json_repositories = new Json($file_name);
$json_repositories = $json_repositories->fetchContent();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can do that in one line which remains easy to read:

$json_repositories = (new Json($file_name))->fetchContent();

@MatonAnthony
Copy link
Collaborator Author

Fixed

flodolo added a commit that referenced this pull request Feb 14, 2016
@flodolo flodolo merged commit e5d7359 into mozfr:master Feb 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants