Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change temp dir and defaults #4

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/Ecomail/ChimpDrill/ChimpDrill.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ protected function parseMessage()
}

// Write file
$file = tempnam(env('APP_TMP_PATH') !== null ? env('APP_TMP_PATH') : storage_path('temp'), 'chimpdrill-');
$file = tempnam(env('APP_TMP_PATH', sys_get_temp_dir()), 'chimpdrill-');

file_put_contents($file, '<?php ob_start(); ?>' . $message . '<?php return ob_get_clean(); ?>');

Expand Down Expand Up @@ -119,7 +119,7 @@ protected function getPlaceholder($name, $default = null)
*
* @return mixed
*/
protected function getArrayPlaceholder($name, $default = null, $key)
protected function getArrayPlaceholder($name, $default = null, $key = null)
{
if(is_int($key)) {
$key = $key - 1;
Expand All @@ -135,7 +135,7 @@ protected function getArrayPlaceholder($name, $default = null, $key)
*
* @return mixed
*/
protected function getArrayPlaceholderWithKey($name, $default = null, $index, $key)
protected function getArrayPlaceholderWithKey($name, $default = null, $index = null, $key = null)
{
if(is_int($index)) {
$index = $index - 1;
Expand Down