Skip to content

Instantly share code, notes, and snippets.

diff --git a/src/Mailer/Transport/SmtpTransport.php b/src/Mailer/Transport/SmtpTransport.php
index 59f4b8041f..d298a0dab9 100644
--- a/src/Mailer/Transport/SmtpTransport.php
+++ b/src/Mailer/Transport/SmtpTransport.php
@@ -271,26 +271,43 @@ class SmtpTransport extends AbstractTransport
*/
protected function _auth(): void
{
- if (isset($this->_config['username'], $this->_config['password'])) {
- $replyCode = (string)$this->_smtpSend('AUTH LOGIN', '334|500|502|504');
diff --git a/src/Error/BaseErrorHandler.php b/src/Error/BaseErrorHandler.php
index 8cb03f96b9..2208bccf8d 100644
--- a/src/Error/BaseErrorHandler.php
+++ b/src/Error/BaseErrorHandler.php
@@ -54,7 +54,7 @@ abstract class BaseErrorHandler
/**
* Exception logger instance.
*
- * @var \Cake\Error\ErrorLogger|null
+ * @var \Cake\Error\ErrorLoggerInterface|null
<?php
// Don't automatically add "plugin" to urls if currently on a plugin action
Router::addUrlFilter(function ($params, $request) {
if (!isset($params['plugin'])) {
$params['plugin'] = false;
}
return $params;
});
<?php
namespace App\Error\Middleware;
use Cake\Error\Middleware\ErrorHandlerMiddleware as CoreErrorHandlerMiddleware;
use Zend\Diactoros\Response\RedirectResponse;
/**
* Error handling middleware.
*
* Checks for old urls and 301 redirects to corresonding new ones.
<?php
namespace App\View\Helper;
use AssetCompress\View\Helper\AssetCompressHelper as BaseHelper;
use Cake\Core\Configure;
class AssetCompressHelper extends BaseHelper
{
public function css($file, $options = [])
{
<?php
// Posts hasMany Images
// Posts hasOne FeaturedImages: where featured image is the first image for that post.
$this->hasOne('FeaturedImages', [
'className' => 'Images',
'foreignKey' => false,
'conditions' => function ($exp, $query) {
$subquery = $query
<?php
App::uses('Hash', 'Utility');
/**
* Translation behavior.
*
* @license MIT
* @url http://code.google.com/p/alkemann
* @author Alexander Morland aka alkemann
* @author Ronny Vindenes
<?php
// Don't automatically add "prefix" to urls
Router::addUrlFilter(function ($params, $request) {
if (!isset($params['_name']) && !array_key_exists('prefix', $params)) {
$params['prefix'] = false;
}
return $params;
});
<?php
namespace App\Model\Behavior;
use Cake\ORM\Behavior;
use Cake\ORM\Query;
use Cake\Utility\Hash;
class MetaBehavior extends Behavior
{