Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
JSON Config save
  • Hi,

    When I save a JSON Config file, it escapes the slashes.

    so this: http://example.com

    will be

    http:\/\/example.com

    Magic quotes is off, so I don't understand.
  • Difficult to say without knowing exactly what you do. There is no add_slashes() in the entire framework, so it must come from somewhere else.
  • The code:


    		\Config::load('../../../composer.json', 'composer', true, true);
    $repositories = \Config::get('composer.repositories', array());
    $repositories[] = array(
    'type' => 'vcs',
    'url' => 'git@gitlab.firstcomputer.hu:fuel/pdf.git'
    );
    \Config::set('composer.repositories', $repositories);
    \Config::save('../../../composer.json', 'composer');

    I found that json_encode adds the slashes.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion