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 missing opening <?php in settings file #94

Merged
merged 2 commits into from Jun 29, 2018

Conversation

Projects
None yet
3 participants
@Quetzacoalt91
Member

Quetzacoalt91 commented Jun 29, 2018

Tag <?php was missing in generated config/settings.php files...

We used a generated settings file as a comparison, to check files are properly created.

@Quetzacoalt91 Quetzacoalt91 added this to the 4.0.0 milestone Jun 29, 2018

@khouloudbelguith

This comment has been minimized.

khouloudbelguith commented Jun 29, 2018

Hi,
It is Ok for me, the upgrade is done successfully from 16.1.18 to 1.6.1.20.
Best regards, Khouloud

foreach ($data as $name => $value) {
if (false === fwrite($fd, 'define(\''.$name.'\', \''.$this->checkString($value).'\');'."\n")) {
if (false === fwrite($fd, 'define(\''.$name.'\', \''.$this->checkString($value).'\');'.PHP_EOL)) {

This comment has been minimized.

@PierreRambaud

PierreRambaud Jun 29, 2018

Contributor

👍

'_RIJNDAEL_IV_' => 'QSt/I95YtA==',
);
$file = sys_get_temp_dir().DIRECTORY_SEPARATOR.'temp_settings.php';

This comment has been minimized.

@PierreRambaud

PierreRambaud Jun 29, 2018

Contributor

tempnam(sys_get_temp_dir(), 'PSS'); is maybe better because creating a uniq file, so you don't need to touch it, and you prevent error if test are running in the same time. Otherwise : http://php.net/manual/fr/function.tmpfile.php wdyt?

This comment has been minimized.

@Quetzacoalt91

Quetzacoalt91 Jun 29, 2018

Member

Thanks for the tip, I used tempname as suggested.

However, as I'm supposed to send a file name, not a resource, I could not use the tmpfile() method.

@Quetzacoalt91 Quetzacoalt91 merged commit 8162c3d into PrestaShop:dev Jun 29, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@Quetzacoalt91 Quetzacoalt91 deleted the Quetzacoalt91:settings-generation branch Jun 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment