mirror of
https://github.com/standardebooks/web.git
synced 2025-07-07 15:20:32 -04:00
Suppress PHP warnings that are handled by PHP Safe
This commit is contained in:
parent
243130ae04
commit
cee4517517
1 changed files with 3 additions and 1 deletions
|
@ -104,7 +104,9 @@ class Ebook{
|
|||
$this->TextUrl = $this->Url . '/text';
|
||||
|
||||
try{
|
||||
$bytes = filesize($this->WwwFilesystemPath . '/text/single-page.xhtml');
|
||||
// PHP Safe throws an exception from filesize() if the file doesn't exist, but PHP still
|
||||
// emits a warning. So, just silence the warning.
|
||||
$bytes = @filesize($this->WwwFilesystemPath . '/text/single-page.xhtml');
|
||||
$sizes = 'BKMGTP';
|
||||
$factor = floor((strlen($bytes) - 1) / 3);
|
||||
$this->TextSinglePageSizeNumber = sprintf('%.1f', $bytes / pow(1024, $factor));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue