Révision fbb66ca6
Ajouté par Assos Assos il y a presque 5 ans
drupal7/misc/typo3/phar-stream-wrapper/src/Interceptor/PharExtensionInterceptor.php | ||
---|---|---|
12 | 12 |
*/ |
13 | 13 |
|
14 | 14 |
use TYPO3\PharStreamWrapper\Assertable; |
15 |
use TYPO3\PharStreamWrapper\Helper; |
|
16 | 15 |
use TYPO3\PharStreamWrapper\Exception; |
16 |
use TYPO3\PharStreamWrapper\Manager; |
|
17 | 17 |
|
18 | 18 |
class PharExtensionInterceptor implements Assertable |
19 | 19 |
{ |
... | ... | |
45 | 45 |
*/ |
46 | 46 |
private function baseFileContainsPharExtension($path) |
47 | 47 |
{ |
48 |
$baseFile = Helper::determineBaseFile($path);
|
|
49 |
if ($baseFile === null) {
|
|
48 |
$invocation = Manager::instance()->resolve($path);
|
|
49 |
if ($invocation === null) {
|
|
50 | 50 |
return false; |
51 | 51 |
} |
52 |
$fileExtension = pathinfo($baseFile, PATHINFO_EXTENSION);
|
|
52 |
$fileExtension = pathinfo($invocation->getBaseName(), PATHINFO_EXTENSION);
|
|
53 | 53 |
return strtolower($fileExtension) === 'phar'; |
54 | 54 |
} |
55 | 55 |
} |
Formats disponibles : Unified diff
Udpate to 7.67