Commit 763f2726 by Scott

Fix old class name, missing offset

parent 0a38d669
......@@ -632,7 +632,7 @@ function qa_post_unindex($postid)
*/
function qa_question_uncache($questionId)
{
$cacheDriver = Q2A_Storage_CacheFactory::getCacheDriver();
$cacheDriver = \Q2A\Storage\CacheFactory::getCacheDriver();
return $cacheDriver->delete("question:$questionId");
}
......
......@@ -25,15 +25,10 @@ define('QA_BUILD_DATE', '2019-01-12');
/**
* Autoloads some Q2A classes so it's possible to use them without adding a require_once first. From version 1.7 onwards.
* These loosely follow PHP-FIG's PSR-0 standard where faux namespaces are separated by underscores. This is being done
* slowly and carefully to maintain backwards compatibility, and does not apply to plugins, themes, nor most of the core
* for that matter.
*
* Classes are stored in the qa-include/Q2A folder, and then in subfolders depending on their categorization.
* Class names should be of the form Q2A_<Namespace>_<Class>, e.g. Q2A_Util_Debug. There may be multiple "namespaces".
* Classes are mapped to PHP files with the underscores converted to directory separators. The Q2A_Util_Debug class is in
* the file qa-include/Q2A/Util/Debug.php. A class named Q2A_Db_User_Messages would be in a file qa-include/Q2A/Db/User/Messages.php.
* Autoloads some Q2A classes so it's possible to use them without adding a require_once first. From
* version 1.9 onwards we follow PSR-4. Classes are stored in qa-src/ which maps to the 'Q2A' namespace.
* So for example \Q2A\Storage\CacheFactory maps to qa-src/Storage/CacheFactory.php.
* In version 1.7-1.8 we used PSR-0 so Q2A_Storage_CacheFactory would map to qa-include/Q2A/Storage/CacheFactory.php.
*
* @param string $class
*/
......
......@@ -565,7 +565,7 @@ class DbConnection
if (is_array($param)) {
// If the first subparam is an array, the rest of the parameter groups should have the same
// amount of elements. E.G.: the output should be '(?, ?), (?, ?)' rather than '(?), (?, ?)'
$subArrayCount = is_array($param[0]) ? count($param[0]) : 0;
$subArrayCount = isset($param[0]) && is_array($param[0]) ? count($param[0]) : 0;
$paramInfo[] = array(
'count' => count($param),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment