1
0
mirror of https://github.com/e107inc/e107.git synced 2025-03-16 10:29:46 +01:00

12439 Commits

Author SHA1 Message Date
Nick Liu
52116adc89
Silence debug prints clearly not meant for CLI
- FIX: e_array::unserialize() HTML vomit in CLI mode
- FIX: e107_debug_shutdown() HTML vomit because $error_handler was not global
2020-01-18 18:57:43 +01:00
Nick Liu
be8f2bbeb6
Fixed PHP 7.3 warnings
- FIX: Silenced compact() in e107Test::testInitCore()
- FIX: Null check in e_db_pdo::makeTableDef()
- FIX: Null check in e_db_mysql::makeTableDef()
- FIX: userlogin::login() had this warning on line 148:
       "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
2020-01-18 18:52:20 +01:00
Nick Liu
4454b01588
Fix PHP 7.3 deprecation warning in lan_ren_help.php
Apparently a bug introduced on 2004-09-21:
https://sourceforge.net/p/e107/svn/898/tree/trunk/e107_0.7/e107_languages/English/lan_ren_help.php

Just happens to be a misuse of the third parameter of define()
2020-01-18 18:43:34 +01:00
Nick Liu
524229ba0b
Fixed a bunch of PHP 7.4 syntax errors
- FIX: Removed pointless (and invalid) destructor in LinkedIn::__destruct()
- FIX: All files that trigger this deprecation notice in PHP 7.4:
       "Array and string offset access syntax with curly braces is deprecated"
2020-01-18 18:26:35 +01:00
Nick Liu
d55fe8a77b
Import LAN for e_formTest::testRenderElement() 2020-01-18 16:36:23 +01:00
Nick Liu
d1bdfb8546
Type checks and corrections for e_parse::thumbSrcSet() 2020-01-18 16:35:21 +01:00
Nick Liu
207ce81106
Bring class2Test::testCheckClass() back to passing (workaround) 2020-01-18 16:35:21 +01:00
Nick Liu
638412af09
Null coalesce optional variable in link.bb 2020-01-18 16:35:20 +01:00
Nick Liu
76c0f7ecdd
Type validation for navigation_shortcode() 2020-01-18 16:35:20 +01:00
Nick Liu
9506f98f69
Empty check for e_tohtml_linkwords::linksproc() 2020-01-18 16:35:20 +01:00
Nick Liu
a1560b1989
Strict fixes for e_tree_model::flattenTree()
- FIX: Null check during child recursion of e_tree_model::flattenTree()
- FIX: TreeModelTest::testTreeParentsAreAssignedCorrectly() apparently never worked until now because the wrong index was used
2020-01-18 16:35:20 +01:00
Nick Liu
d6eafdc3fc
Null check for e_user_model::isBot() 2020-01-18 16:35:19 +01:00
Nick Liu
f56bf44b98
Ignore redefines of EUF_* constants in e107_user_extended 2020-01-18 16:35:19 +01:00
Nick Liu
cf8dc0b909
Null coalescing for e_theme constructor 2020-01-18 16:35:19 +01:00
Nick Liu
f5f145485a
Eliminated notice failures in e107Test
- FIX: e107::getTemplate() could be run without the necessary plugin LANs
- FIX: e107Test::testGetInstance() included e107_config.php too many times
- FIX: Empty check in e107Test::testGetTemplate()
2020-01-18 16:35:19 +01:00
Nick Liu
91660a2c32
Test isolation fixes for e_db_abstractTest
Also needed a null check in e_db_pdo::db_Query()
2020-01-18 16:35:18 +01:00
Nick Liu
a0f4489e41
Disabled db_verifyTest::testGetIndex() due to no assertions 2020-01-18 16:35:18 +01:00
Nick Liu
b8d6b9eccb
Type and null checks for pluginsTest 2020-01-18 16:35:18 +01:00
Nick Liu
fc6b81fdd4
Fix undefined constant by importing LAN in e_marketplace
Apparently e_marketplace depends on the admin area theme LAN
2020-01-18 16:35:17 +01:00
Nick Liu
622be85140
Type checks involving e_formTest
- MOD: e107::getTemplate() now accepts blank strings for the plugin name to mean
       that a core template should be loaded
- FIX: e_form::progressBar() now supports input values that already have % at the end
- FIX: Null check for $options['list'] in e_form::progressBar()
- NEW: Test rounding in e_formTest::testProgressBar()
2020-01-18 16:35:17 +01:00
Nick Liu
46b541889f
Fixed array key absence check in e_db_abstractTest::testDb_Fetch() 2020-01-18 16:35:17 +01:00
Nick Liu
15de2e233b
Null check for e_file::file_size_decode() 2020-01-18 16:35:17 +01:00
Nick Liu
d2d0105378
Null check for UserHandler::userClassUpdate() 2020-01-18 16:35:16 +01:00
Nick Liu
509b9ff761
Type check for online_shortcodes::sc_online_member_user() 2020-01-18 16:35:16 +01:00
Nick Liu
dbdb5f4a86
Fix e_arrayTest::testUnserialize()
e_DEBUG is already set because of the new test debug strategy
2020-01-18 11:38:39 +01:00
Nick Liu
1d72d48a35
Type checks for db_verify::prepareResults() 2020-01-18 11:38:36 +01:00
Nick Liu
ce510159a9
Removed useless STRPTIME_COMPAT constant 2020-01-18 11:05:09 +01:00
Nick Liu
24fe5c80ac
Updated pclzip.lib.php to v2.8.4 to fix math error
Also suppress mkdir() error in e_file::unzipGithubArchive()
2020-01-18 11:05:09 +01:00
Nick Liu
82499f70a9
Debug variable scope fix in e107plugin::XmlTables() 2020-01-18 11:05:08 +01:00
Nick Liu
1561992815
Removed unused variable from e107plugin::XmlAdminLinks()
Was causing an undefined index error
2020-01-18 11:05:08 +01:00
Nick Liu
98911f0b8e
Guard type errors in e_db::insert() implementations 2020-01-18 11:05:08 +01:00
Nick Liu
b2bd6763de
Null checks for e107TinyMceParserTest
- FIX: Do not redefine e_ADMIN_AREA in parser.php
- FIX: Null checks for e107TinyMceParser
- FIX: Array type check for e_bbcode::imgToBBcode()
- FIX: Optional query string in e_parse::thumbUrlDecode()
- FIX: Don't redefine TINYMCE_UNIT_TEST
2020-01-18 11:05:08 +01:00
Nick Liu
c604b3019c
Fixed type check in e_form::option_multi() 2020-01-18 11:05:07 +01:00
Nick Liu
8e0b047a73
array_diff_recursive() type check for recursion 2020-01-18 11:05:07 +01:00
Nick Liu
66a9765f50
Corrected subset check in user_classTest::testGetUsersInClass() 2020-01-18 11:05:07 +01:00
Nick Liu
78a5c2aec7
Disabled e_onlineTest::testGoOnline() – has no assertions 2020-01-18 11:05:06 +01:00
Nick Liu
b4e48f8cbf
Fix duplicate constant in lancheckTest 2020-01-17 19:08:46 +01:00
Nick Liu
62a547aed2
Fixed E_NOTICE in plugin install/uninstall process
- FIX: e107::coreLan() now loads the lan_admin.php file if the $admin argument is true
- FIX: Variable scope of $eplug_folder in e107plugin::uninstall()
- FIX: isset() check order in pluginsTest::makePluginReport()
- FIX: class2.php: Missing ADMINPERMS constant in CLI mode
2020-01-17 17:11:26 +01:00
Nick Liu
bfad3f7202
Suppressed constant already defined errors in e_db_mysqlTest 2020-01-17 15:57:34 +01:00
Nick Liu
ef34ef7ec8
Removed obsolete ALLOW_AUTO_FIELD_DEFS constant 2020-01-17 15:54:56 +01:00
Nick Liu
4321c1b944
Null coalescing for $_SERVER keys in session_handler.php
Resolves CLI-invoked E_NOTICE in:
* e_session::getValidateData()
* e_core_session::challenge()
2020-01-17 15:54:12 +01:00
Nick Liu
6fe4bf16be
Null coalescing for $_SERVER keys in online_class.php
Resolves CLI-invoked E_NOTICE in:
* e_online::goOnline()
2020-01-17 15:46:15 +01:00
Nick Liu
a49b532519
Stop stepping on E107_DBG_* constants in tests
\Helper\Unit::_beforeSuite() now sets E107_DEBUG_LEVEL so that
debug_handler.php sets the debug mode.

Also fixed E_NOTICE if E107_DEBUG_LEVEL is set beforehand
2020-01-17 15:42:57 +01:00
Nick Liu
bcba1e065f
Null coalescing for $_SERVER keys in iphandler_class.php
Resolves CLI-invoked E_NOTICE in:
* eIPHandler::__construct()
* eIPHandler::getCurrentIP()

Also resolves possible blank eIPHandler::$serverIP
2020-01-17 15:11:45 +01:00
Nick Liu
c232613e44
Fix mkdir() failure in e107::_init() if parent not exists 2020-01-17 15:10:18 +01:00
Nick Liu
be36462fe6
Null coalescing for $_SERVER keys in e107_class.php
Removes CLI-invoked E_NOTICE in:
* e107::prepare_request()
* e107::set_constants()
* e107::set_urls()
2020-01-17 15:04:29 +01:00
Nick Liu
b9d4961571
Turn off web error handler for CLI (breaks a lot of stuff!)
error_handler now only runs set_error_handler in web mode.

E_ALL notices, warnings, and errors are now reported, which causes
the test harness to fail.
2020-01-17 14:48:55 +01:00
Nick Liu
34047a2db3
Prevent HTML code injection in e107::url()
Fixes: 

This is a better fix for . HTML code injection can no longer occur in URLs generated by
e107::url() thanks to htmlspecialchars(). The previous implementation only addressed:

    & => &

Now, quotation marks and alligator brackets are also escaped, so:

    <a href=""></html>"></a>

is now rendered as:

    <a href="&quot;&gt;&lt;/html&gt;"></a>
2020-01-14 23:56:19 +01:00
Nick Liu
82b2da4c36
Better documentation for e107::url()
Clarifies that the output format of e107::url() is like htmlspecialchars()
2020-01-14 23:56:19 +01:00
Cameron
ac47858941 PHP Notice Fix. 2020-01-14 14:44:29 -08:00