Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7fd7f03

Browse files
committed
Fixed error in usage of simplexml_load_file()
1 parent 18f4d5e commit 7fd7f03

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

‎demos/login-system/protected/modules/setup/controllers/SetupController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ public function readyAction()
466466
$enable = isset($modValue['enable']) ? (bool)$modValue['enable'] : false;
467467
if ($enable && !empty($module)) {
468468
$modulePath = '/protected/modules/' . htmlspecialchars($module) . '/';
469-
$xml = simplexml_load_file(APPHP_PATH . $modulePath . 'info.xml');
469+
$xml = simplexml_load_string(file_get_contents(APPHP_PATH.$modulePath.'info.xml'));
470470
if (is_object($xml)) {
471471
$sqlDumpFile = isset($xml->files->data->install) ? $xml->files->data->install : '';
472472
$sqlDump = file(APPHP_PATH . $modulePath . 'data/' . $sqlDumpFile);

‎demos/simple-blog/protected/modules/setup/controllers/SetupController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ public function readyAction()
441441
$enable = isset($modValue['enable']) ? (bool)$modValue['enable'] : false;
442442
if ($enable && !empty($module)) {
443443
$modulePath = '/protected/modules/' . htmlspecialchars($module) . '/';
444-
$xml = simplexml_load_file(APPHP_PATH . $modulePath . 'info.xml');
444+
$xml = simplexml_load_string(file_get_contents(APPHP_PATH.$modulePath.'info.xml'));
445445
if (is_object($xml)) {
446446
$sqlDumpFile = isset($xml->files->data->install) ? $xml->files->data->install : '';
447447
$sqlDump = file(APPHP_PATH . $modulePath . 'data/' . $sqlDumpFile);

‎demos/simple-cms/protected/modules/setup/controllers/SetupController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ public function readyAction()
441441
$enable = isset($modValue['enable']) ? (bool)$modValue['enable'] : false;
442442
if ($enable && !empty($module)) {
443443
$modulePath = '/protected/modules/' . htmlspecialchars($module) . '/';
444-
$xml = simplexml_load_file(APPHP_PATH . $modulePath . 'info.xml');
444+
$xml = simplexml_load_string(file_get_contents(APPHP_PATH.$modulePath.'info.xml'));
445445
if (is_object($xml)) {
446446
$sqlDumpFile = isset($xml->files->data->install) ? $xml->files->data->install : '';
447447
$sqlDump = file(APPHP_PATH . $modulePath . 'data/' . $sqlDumpFile);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /