File Genie PHP error: "Missing argument 1 for processfolder()"
I am getting the following Errors:
Warning: Missing argument 1 for processfolder() in /../ScriptLibrary/incFileGenie.php on line 83
Warning: Missing argument 2 for processfolder() in /../ScriptLibrary/incFileGenie.php on line 83
Answer:These are not an errors but simply a warning messages. To fix this issue you have just to suppress the PHP warnings.
This can be accomplished by several ways:
1. Add @ character at the beginning of the following line: $Upload->processFolder();
The modified line should look like this:
@$Upload->processFolder();
2. Add the following line at the beginning of your page:
<?php error_reporting (E_ALL ^ E_WARNING); ?>
Note: The above line will suppress all the warning at your page. If you want to suppress the warning only for FileGenie Folder List try the following solution:
Add the following lines around Folder List code:
<?php
$nOldErrorReporting = ini_get( "error_reporting" );
ini_set( "error_reporting", $nOldErrorReporting & ~E_WARNING );
?>
<?php
// *** Folder List 1.03
/*
Folder List
code */
?>
<?php ini_set( "error_reporting", $nOldErrorReporting ); ?>
The resulting code may look like this:
<?php
$nOldErrorReporting = ini_get( "error_reporting" );
ini_set( "error_reporting", $nOldErrorReporting & ~E_WARNING );
?>
<?php
// *** Folder List 1.03
$Upload = new fileGenie();
$Upload->path = "Upload";
$Upload->allowedExtensions = "";
$Upload->includeFolders = false;
$Upload->showThumbnailsOnly = false;
$Upload->thumbnailsSuffix = "_small";
$Upload->naming = "suffix";
$Upload->thumbPath = "";
$Upload->processFolder();
?>
<?php ini_set( "error_reporting", $nOldErrorReporting ); ?>
Note: Have in mind that when you modify the extensions code, Dreamweaver could stop to show that the extension is implemented at your PHP page. Although, the code still will be there you could not be able to modify the extension through Dreamweaver Server Behaviors. Therefore, make these changes at the end.
3. Modify the php.ini file.
If you have access to the php.ini modify the PHP options to suppress the warning and restart your web server. To do that check the following php.ini section: "Error handling and logging" and assign appropriate value to variable error_reporting.
For example:
error_reporting = E_ALL & ~E_WARNING
Note: Changing the file php.ini will affect the behavior of all you PHP applications.
Comments
Be the first to write a comment
You must me logged in to write a comment.