Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/flow-flo.../libs/cakephp/core/Configur...
File: FileConfigTrait.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
[2] Fix | Delete
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
[3] Fix | Delete
*
[4] Fix | Delete
* Licensed under The MIT License
[5] Fix | Delete
* For full copyright and license information, please see the LICENSE.txt
[6] Fix | Delete
* Redistributions of files must retain the above copyright notice.
[7] Fix | Delete
*
[8] Fix | Delete
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
[9] Fix | Delete
* @link https://cakephp.org CakePHP(tm) Project
[10] Fix | Delete
* @since 3.0.0
[11] Fix | Delete
* @license https://opensource.org/licenses/mit-license.php MIT License
[12] Fix | Delete
*/
[13] Fix | Delete
namespace Cake\Core\Configure;
[14] Fix | Delete
[15] Fix | Delete
use Cake\Core\Exception\Exception;
[16] Fix | Delete
use Cake\Core\Plugin;
[17] Fix | Delete
[18] Fix | Delete
/**
[19] Fix | Delete
* Trait providing utility methods for file based config engines.
[20] Fix | Delete
*/
[21] Fix | Delete
trait FileConfigTrait
[22] Fix | Delete
{
[23] Fix | Delete
/**
[24] Fix | Delete
* The path this engine finds files on.
[25] Fix | Delete
*
[26] Fix | Delete
* @var string
[27] Fix | Delete
*/
[28] Fix | Delete
protected $_path = '';
[29] Fix | Delete
[30] Fix | Delete
/**
[31] Fix | Delete
* Get file path
[32] Fix | Delete
*
[33] Fix | Delete
* @param string $key The identifier to write to. If the key has a . it will be treated
[34] Fix | Delete
* as a plugin prefix.
[35] Fix | Delete
* @param bool $checkExists Whether to check if file exists. Defaults to false.
[36] Fix | Delete
* @return string Full file path
[37] Fix | Delete
* @throws \Cake\Core\Exception\Exception When files don't exist or when
[38] Fix | Delete
* files contain '..' as this could lead to abusive reads.
[39] Fix | Delete
*/
[40] Fix | Delete
protected function _getFilePath($key, $checkExists = false)
[41] Fix | Delete
{
[42] Fix | Delete
if (strpos($key, '..') !== false) {
[43] Fix | Delete
throw new Exception('Cannot load/dump configuration files with ../ in them.');
[44] Fix | Delete
}
[45] Fix | Delete
[46] Fix | Delete
list($plugin, $key) = pluginSplit($key);
[47] Fix | Delete
[48] Fix | Delete
if ($plugin) {
[49] Fix | Delete
$file = Plugin::configPath($plugin) . $key;
[50] Fix | Delete
} else {
[51] Fix | Delete
$file = $this->_path . $key;
[52] Fix | Delete
}
[53] Fix | Delete
[54] Fix | Delete
$file .= $this->_extension;
[55] Fix | Delete
[56] Fix | Delete
if (!$checkExists || is_file($file)) {
[57] Fix | Delete
return $file;
[58] Fix | Delete
}
[59] Fix | Delete
[60] Fix | Delete
$realPath = realpath($file);
[61] Fix | Delete
if ($realPath !== false && is_file($realPath)) {
[62] Fix | Delete
return $realPath;
[63] Fix | Delete
}
[64] Fix | Delete
[65] Fix | Delete
throw new Exception(sprintf('Could not load configuration file: %s', $file));
[66] Fix | Delete
}
[67] Fix | Delete
}
[68] Fix | Delete
[69] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function