Comments (3)
Hello,
This issue is the reason for your upload file size. This exception function ;
/**
* Calculate the file size in human readable byte notation.
* @param int $precision (_optional_) Number of decimal places to include.
* @return string
*/
public function readableSize(int $precision = 1): string
{
return File::readableSize($this->size, $precision);
}
from akaunting.
Thanks for that info... is it necessary or can it be commended out? Can I change it to something that won't cause an issue?
from akaunting.
The error message indicates that there is an issue in the Plank\Mediable\Helpers\File::readableSize()
method call in the Media.php
file on line 308. The error specifies that the first argument passed to this method must be of type int
, but a string is being provided.
To solve this issue, you need to make sure that the value passed as the first argument to File::readableSize()
is an integer.
Here are some steps you can follow:
-
Check the data type of the argument:
Look at the code inMedia.php
on line 308 and check what value is being passed as the first argument toFile::readableSize()
. Ensure that it is an integer. -
Convert the argument to an integer if necessary:
If the argument is a string, you may need to convert it to an integer before passing it toFile::readableSize()
. You can use theintval()
function for this purpose.$bytes = intval($yourStringValue);
Replace
$yourStringValue
with the actual variable or value that is being passed. -
Handle edge cases:
Ensure that the value being passed toFile::readableSize()
is always a valid integer. If there are cases where it could be a string, make sure to handle those cases appropriately. -
Check for other instances of the method call:
If the issue persists, check if there are other places in your codebase whereFile::readableSize()
is called and review those calls to ensure that the first argument is always of typeint
.
Once you have made the necessary adjustments, the error should be resolved. Additionally, you may want to check the documentation or source code of the Plank\Mediable\Helpers\File
class to understand the expected input types for the readableSize()
method.
from akaunting.
Related Issues (20)
- Error in npm install HOT 3
- Sorting feature on the transfer page is not working
- Sorting feature on tax settings page not working
- Invoice and Email Service settings are not getting saved. HOT 3
- Recurring with adviced crontab not doing anything HOT 1
- Recurring Invoice does not attach PDF to generated email
- Error Add Primary Key Query HOT 3
- Invoice items price gets multiplied when currency accuracy is changed HOT 1
- Custom invoice colour without hash sign is not interpreted on invoice
- 31st Dec not reflected in cash flow plot
- SQL constrain violation on uploading media with the same name HOT 1
- Akaunting 3.1.5 , after database population step, script doesn't switch to admin tab HOT 4
- Error while installing: Uncaught Error: Failed opening required '/home/ubuntu/akaunting/bootstrap/. HOT 3
- Articles are missing when editing a draft invoice HOT 1
- Error when export invoices HOT 1
- Deprecated: Optional parameter HOT 2
- Bug in new release 3.1.7 HOT 1
- Attachments in bills/invoices not downloadable anymore after update
- Menu vanished after update HOT 2
- Unable to install the app if your database is SQLite
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from akaunting.