Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closing out the 'test-php-7' feature branch and merging back to devel…
…op (#420) * Fixed #171 Used mysqli procedural methods instead of mysql methods. This is a quick fix to make OpenCATS compatible with PHP7. * Updated mysql extension in docker config * Fix insecure SMTP (#357) A past phpmailer update changed to assume to use TLS even if its not enabled. This breaks insecure SMTP connections. * Fix deprecated PHP4-style constructors (#358) In some cases the file name implies it's for use with PHP4 which probably doesn't work anymore. I changed those too so there isn't noise in php7cc output * Gate set_magic_quotes_runtime calls Function was removed in PHP 7. Versions of PHP where this functionality exists are theoretically not supported and these calls could be removed entirely instead of placed behind function_exists() checks * Validate emails with filter_var() instead of eregi() The ereg functions were removed in PHP 7. In this specific use case filter_var() seems like a better solution than migrating to a preg regex. * Replace ereg functions with preg functions erege functions were removed in PHP 7. FPDF has the same patch upstream; artichow doesn't appear to have been updated upstream. * Use explode() instead of split() split() was removed in PHP 7. Code was simply splitting on different single character delimiters so using explode() instead works fine. * Don't combine `&` and `new` operators This is a syntax error in PHP 7. It's been deprecated for a long time so this change probably has no impact on behavior * Updated issue template to be more specific * Update issue_template.md * config file for the ProBot no-response bot add the tag more-information-required to issues, if no response then will auto-close in 14 days. * Update no-response.yml * Updated test data for MySQL; - strict mode compliant (now the default), and; - added in candidate_tag tables to MySQL table structure Installer does not error now when you select the demonstration data. * Revert "Updated test data for MySQL;" This reverts commit 2ce655a. * Update modules/settings/SettingsUI.php Co-Authored-By: gohanman <andy@gohanman.com> * $co$conn is presumably a typo * Correct mysqli_select_db argument order * Missing paren in mysqli refactor * Use MYSQLI_ASSOC consistently * Update travis.yml for php 7.3 checks exclusively * revised composer.json to require php v7 * Fix the PHP7 build in travis (#419) * Rename composer.lock to ~composer.lock * revert custom php image to generic * Update .travis.yml * Update .travis.yml * revert custom php image * Update docker-compose-test.yml * Update docker-compose.yml * Update docker-compose.yml * Update docker-compose.yml * Update docker-compose-test.yml * Update docker-compose-test.yml * Update docker-compose.yml * Update docker-compose.yml * Update docker-compose-test.yml * Update docker-compose.yml * Update docker-compose-test.yml * Rename ~composer.lock to composer.lock * Update .travis.yml * Update .travis.yml * pointed to russh dockerhub image for php 7.2 * update travis to use php 7.2 * Rename composer.lock to composer.lock_OFF * tracking composer.lock for php 7.2 * updated target for php to be 7.2-fpm-alpine * fixed typos * remove redundant filew * test fix for travis build errors * simple rename php5 -> php7 in user instructions * quick update to address XXE vulnerability * New set of fixes for PHP 7.2 (#429) * Updated PHPMailer to support PHP 7.2 - PHPMailer 5.2 is no longer supported. - Legacy PHPMailer, which was under /lib didn't support PHP 7 best practices. - Removed /lib/PHPMailer directory. - Updated /lib/Mailer.php to support the new PHPMailer v6. - Updated code to support PHPMailer v6. - Tested the work locally and works fine. * Resolved mysqli_error() handling by leveraging provided and tested PHP library function utilities. - Where mysqli_connect was verified, I simplified and replaced error handling with with mysqli_connect_errno() and mysqli_connect_error(). - Where query request was verified, I simplified and replaced error handling with queryResult->connect_errno() and queryResult->connect_error(). * Added .DS_Store file in .gitignore - Specified common Mac OS specific .DS_Store file to be ignored by git. * Added codacy/coverage vendor library to the project's Composer dev dependencies list. * Resolved issue with non-static method calls, as such: - Corrected DatabaseSearch's fulltextDecode() and fulltextEncord() methods' signatures to be static. - Corrected Contacts' getDepartmentIDByName() method call. Since, it was used differently multiple places. * Resolved issue related to innaccessible property, as such: - Reinforced query result object property existance check with isset(). * Resolved issue around referencing a non-existing scope property, as such: - Replaced $sql with $this to correctly access class properties. * Artichow - Resolved graph generation issue with PHP 7.2 - Label.class.php was complaining about count() param (texts) not being an array. Variable value needed to be verified prior the call to count(). - Label.class.php and Axis.class.php were complaining about function name was malformed for eval() to handle. microtime() needed to be carefully handled. * Updated .gitignore to dismiss /vendor folder, which get generated by composer. * Sphinx Search fixes for PHP 7.2 - Resolved deprecated create_function() by replacing with closure/anonymous function in Search.php. - Resolved count() complaining about $this->_rs not being an array in Search.php on line 2091. - Resolved by creating sphinx.conf to support newer Sphinx 2.2.4+ features. - Resolved by creating the missing required folders for Sphinx use.
- Loading branch information