We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When i paste a image from web directly on wiki page, wikidocs create error_log file with
[03-Jan-2025 12:07:16 UTC] PHP Warning: Undefined array key "tmp_name" in /example.pt/submit.php on line 306
When use wikidocs image upload system work's fine!
WIndows 10 Pro, Chrome browser
No response
The text was updated successfully, but these errors were encountered:
After some analisys I change line 306,
from if($image['tmp_name']){ to if (isset($image['tmp_name']) && $image['tmp_name']) {
if($image['tmp_name']){
if (isset($image['tmp_name']) && $image['tmp_name']) {
2nd line of code:
// check for posted image if($image['tmp_name']){ if(move_uploaded_file($image['tmp_name'],$DOC->DIR.$file_name)){$uploaded=true;} // check for pasted image }elseif(strlen($image['base64'])){ $bytes=file_put_contents($DOC->DIR.$file_name,base64_decode($image['base64'])); if($bytes>0){ $image['size']=$bytes; $uploaded=true; } }
to
// check for posted image if(isset($image['tmp_name']) && $image['tmp_name']){ if(move_uploaded_file($image['tmp_name'],$DOC->DIR.$file_name)){$uploaded=true;} // check for pasted image }elseif(strlen($image['base64'])){ $bytes=file_put_contents($DOC->DIR.$file_name,base64_decode($image['base64'])); if($bytes>0){ $image['size']=$bytes; $uploaded=true; } }
I tested with paste and with wikidocs image upload and it work! Please verify.
Sorry, something went wrong.
@ffiesta can you create a pull requests?
DONE #231
No branches or pull requests
Describe your issue
When i paste a image from web directly on wiki page, wikidocs create error_log file with
When use wikidocs image upload system work's fine!
Device and settings
WIndows 10 Pro, Chrome browser
Steps to reproduce
Screenshots (optional)
No response
Extra fields
The text was updated successfully, but these errors were encountered: